]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hw_random: make buffer usable in scatterlist.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 4 Mar 2013 23:37:08 +0000 (10:07 +1030)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:32:04 +0000 (11:32 -0700)
commit728975e1e15673f9e45ee5d0f1581d8787f3c3b7
treec507e9588c5276d43bfbbbecac033d2d42c7fdb3
parent5295f18c9d943d207fa9101b4d10952ad185b8bc
hw_random: make buffer usable in scatterlist.

commit f7f154f1246ccc5a0a7e9ce50932627d60a0c878 upstream.

virtio_rng feeds the randomness buffer handed by the core directly
into the scatterlist, since commit bb347d98079a547e80bd4722dee1de61e4dca0e8.

However, if CONFIG_HW_RANDOM=m, the static buffer isn't a linear address
(at least on most archs).  We could fix this in virtio_rng, but it's actually
far easier to just do it in the core as virtio_rng would have to allocate
a buffer every time (it doesn't know how much the core will want to read).

Reported-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/hw_random/core.c