]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: ensure RNG is seeded before using
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 8 Jun 2017 02:44:54 +0000 (22:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jun 2017 02:06:28 +0000 (22:06 -0400)
commitc141bb516e2ab90689e5e0a3972aa0519ae3e928
treeb5d8eb3b6f2d986cb3733ad19561a63961de0f93
parent57961d91b091edc99156eb5fb176ef0b77c5c672
ceph: ensure RNG is seeded before using

Ceph uses the RNG for various nonce generations, and it shouldn't accept
using bad randomness. So, we wait for the RNG to be properly seeded. We
do this by calling wait_for_random_bytes() in a function that is
certainly called in process context, early on, so that all subsequent
calls to get_random_bytes are necessarily acceptable.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Sage Weil <sage@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
net/ceph/ceph_common.c