Rusty Russell 9372b35e11 hwrng: place mutex around read functions and buffers.
There's currently a big lock around everything, and it means that we
can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current)
while the rng is reading.  This is a real problem when the rng is slow,
or blocked (eg. virtio_rng with qemu's default /dev/random backend)

This doesn't help (it leaves the current lock untouched), just adds a
lock to protect the read function and the static buffers, in preparation
for transition.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2014-12-22 23:02:38 +11:00
..
2014-10-02 14:35:00 +08:00
2014-12-14 16:10:09 -08:00
2014-12-14 16:10:09 -08:00
2014-10-02 14:35:00 +08:00
2014-10-02 14:35:00 +08:00
2014-11-20 22:39:41 +08:00
2008-07-18 00:46:09 -07:00
2011-07-28 01:26:30 -07:00
2014-10-02 14:35:00 +08:00