]> git.baikalelectronics.ru Git - kernel.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)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 4 Mar 2013 23:41:41 +0000 (10:11 +1030)
commit2a44c9b9482da4003364376183f4bdcd3064230a
tree136b9c7b410816bc15795f47fb808bdaca504204
parent5d5acf7f3e8c669857f1288b923731e4b4ceb550
hw_random: make buffer usable in scatterlist.

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

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>
Cc: stable@kernel.org
drivers/char/hw_random/core.c