1. 27 12月, 2016 4 次提交
  2. 25 12月, 2016 1 次提交
  3. 01 11月, 2016 1 次提交
  4. 19 10月, 2016 1 次提交
  5. 13 9月, 2016 1 次提交
  6. 04 12月, 2015 1 次提交
    • J
      hwrng: core - sleep interruptible in read · 1ab87298
      Jiri Slaby 提交于
      hwrng kthread can be waiting via hwrng_fillfn for some data from a rng
      like virtio-rng:
      hwrng           D ffff880093e17798     0   382      2 0x00000000
      ...
      Call Trace:
       [<ffffffff817339c6>] wait_for_completion_killable+0x96/0x210
       [<ffffffffa00aa1b7>] virtio_read+0x57/0xf0 [virtio_rng]
       [<ffffffff814f4a35>] hwrng_fillfn+0x75/0x130
       [<ffffffff810aa243>] kthread+0xf3/0x110
      
      And when some user program tries to read the /dev node in this state,
      we get:
      rngd            D ffff880093e17798     0   762      1 0x00000004
      ...
      Call Trace:
       [<ffffffff817351ac>] mutex_lock_nested+0x15c/0x3e0
       [<ffffffff814f478e>] rng_dev_read+0x6e/0x240
       [<ffffffff81231958>] __vfs_read+0x28/0xe0
       [<ffffffff81232393>] vfs_read+0x83/0x130
      
      And this is indeed unkillable. So use mutex_lock_interruptible
      instead of mutex_lock in rng_dev_read and exit immediatelly when
      interrupted. And possibly return already read data, if any (as POSIX
      allows).
      
      v2: use ERESTARTSYS instead of EINTR
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: <linux-crypto@vger.kernel.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1ab87298
  7. 21 9月, 2015 1 次提交
  8. 28 7月, 2015 1 次提交
  9. 25 3月, 2015 1 次提交
  10. 18 3月, 2015 1 次提交
  11. 16 3月, 2015 1 次提交
  12. 26 12月, 2014 5 次提交
  13. 22 12月, 2014 6 次提交
  14. 24 10月, 2014 1 次提交
  15. 06 8月, 2014 1 次提交
  16. 27 7月, 2014 1 次提交
  17. 15 7月, 2014 3 次提交
  18. 14 7月, 2014 2 次提交
    • A
      hwrng: virtio - ensure reads happen after successful probe · e052dbf5
      Amit Shah 提交于
      The hwrng core asks for random data in the hwrng_register() call itself
      from commit d9e79726.  This doesn't play well with virtio -- the
      DRIVER_OK bit is only set by virtio core on a successful probe, and
      we're not yet out of our probe routine when this call is made.  This
      causes the host to not acknowledge any requests we put in the virtqueue,
      and the insmod or kernel boot process just waits for data to arrive from
      the host, which never happens.
      
      CC: Kees Cook <keescook@chromium.org>
      CC: Jason Cooper <jason@lakedaemon.net>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: <stable@vger.kernel.org> # For v3.15+
      Reviewed-by: NJason Cooper <jason@lakedaemon.net>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e052dbf5
    • A
      hwrng: fetch randomness only after device init · d3cc7996
      Amit Shah 提交于
      Commit d9e79726 "hwrng: add randomness to system from rng sources"
      added a call to rng_get_data() from the hwrng_register() function.
      However, some rng devices need initialization before data can be read
      from them.
      
      This commit makes the call to rng_get_data() depend on no init fn
      pointer being registered by the device.  If an init function is
      registered, this call is made after device init.
      
      CC: Kees Cook <keescook@chromium.org>
      CC: Jason Cooper <jason@lakedaemon.net>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: <stable@vger.kernel.org> # For v3.15+
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Reviewed-by: NJason Cooper <jason@lakedaemon.net>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      d3cc7996
  19. 10 3月, 2014 1 次提交
  20. 09 2月, 2014 1 次提交
  21. 08 2月, 2014 1 次提交
    • P
      drivers/char: delete non-required instances of include <linux/init.h> · 4c020b03
      Paul Gortmaker 提交于
      None of these files are actually using any __init type directives
      and hence don't need to include <linux/init.h>.  Most are just a
      left over from __devinit and __cpuinit removal, or simply due to
      code getting copied from one driver to the next.
      
      Cc: David Airlie <airlied@linux.ie>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Peter Huewe <peterhuewe@gmx.de>
      Cc: Ashley Lai <ashley@ashleylai.com>
      Cc: Marcel Selhorst <tpmdd@selhorst.net>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c020b03
  22. 20 3月, 2013 1 次提交
  23. 05 3月, 2013 1 次提交
  24. 07 7月, 2011 1 次提交
  25. 18 11月, 2010 1 次提交