diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-12-08 16:50:35 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-12-22 23:02:38 +1100 |
commit | 9372b35e11149c5314f56f939775e67d83057604 (patch) | |
tree | 5f5d8e33af4f3f02a56299c88348853b2582bca7 /lib/hweight.c | |
parent | 25fb8638e919bc7431a73f2fb4a9713818ae2c9d (diff) |
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>
Diffstat (limited to 'lib/hweight.c')
0 files changed, 0 insertions, 0 deletions