aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-10-05 12:54:38 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-10-06 09:35:55 -0600
commita890d1c657ecba73a7b28591c92587aef1be1888 (patch)
tree68fb9a77194451d4b78fb5a87ee2ff2974ad36a8 /include/linux/random.h
parentrandom: fix typos in get_random_bytes() comment (diff)
downloadlinux-dev-a890d1c657ecba73a7b28591c92587aef1be1888.tar.xz
linux-dev-a890d1c657ecba73a7b28591c92587aef1be1888.zip
random: clear new batches when bringing new CPUs online
The commit that added the new get_random_{u8,u16}() functions neglected to update the code that clears the batches when bringing up a new CPU. It also forgot a few comments and helper defines, so add those in too. Fixes: 585cd5fe9f73 ("random: add 8-bit and 16-bit batches") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index 2c130f8f18e5..08322f700cdc 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -96,6 +96,8 @@ static inline int get_random_bytes_wait(void *buf, size_t nbytes)
*out = get_random_ ## name(); \
return 0; \
}
+declare_get_random_var_wait(u8, u8)
+declare_get_random_var_wait(u16, u16)
declare_get_random_var_wait(u32, u32)
declare_get_random_var_wait(u64, u32)
declare_get_random_var_wait(int, unsigned int)