From: Rusty Russell Date: Mon, 8 Dec 2014 08:50:35 +0000 (+0800) Subject: hwrng: place mutex around read functions and buffers. X-Git-Tag: fixes-v4.0-rc1~106^2~62 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9372b35e11149c5314f56f939775e67d83057604;p=pandora-kernel.git 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 Signed-off-by: Herbert Xu --- Reading git-diff-tree failed