]> 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)
commit03e5c16ed4cb5626ad36db4e3c49eb52385d2cf7
treeb5d8eb3b6f2d986cb3733ad19561a63961de0f93
parente44b5afaed58f6d713e4f0f66cde6feea8626d27
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