diff options
author | Linus Torvalds | 2016-07-28 13:46:25 -0700 |
---|---|---|
committer | Linus Torvalds | 2016-07-28 13:46:25 -0700 |
commit | 71e9dcc0019c8b1e7395d2d1512c08aa1c828710 (patch) | |
tree | 400fe7f8b4467d0551ba0aec4216fa11a38ef107 /drivers/char | |
parent | 6784725ab0b9473ce44bfad91a256bd72b5cddc1 (diff) | |
parent | 59b8d4f1f5d26e4ca92172ff6dcd1492cdb39613 (diff) |
Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull random driver fix from Ted Ts'o:
"Fix a boot failure on systems with non-contiguous NUMA id's"
* tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
random: use for_each_online_node() to iterate over NUMA nodes
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/random.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 8d0af74f6569..7f0622426b97 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1668,13 +1668,12 @@ static int rand_initialize(void) #ifdef CONFIG_NUMA pool = kmalloc(num_nodes * sizeof(void *), GFP_KERNEL|__GFP_NOFAIL|__GFP_ZERO); - for (i=0; i < num_nodes; i++) { + for_each_online_node(i) { crng = kmalloc_node(sizeof(struct crng_state), GFP_KERNEL | __GFP_NOFAIL, i); spin_lock_init(&crng->lock); crng_initialize(crng); pool[i] = crng; - } mb(); crng_node_pool = pool; |