summaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorJason A. Donenfeld2017-06-08 02:05:02 +0200
committerTheodore Ts'o2017-06-20 04:06:28 +0200
commitda9ba564bd683374b8d319756f312821b8265b06 (patch)
tree14608d249e7d2a5cd33b5ec86e28943330f74608 /include/linux/net.h
parentrandom: add wait_for_random_bytes() API (diff)
downloadkernel-qcow2-linux-da9ba564bd683374b8d319756f312821b8265b06.tar.gz
kernel-qcow2-linux-da9ba564bd683374b8d319756f312821b8265b06.tar.xz
kernel-qcow2-linux-da9ba564bd683374b8d319756f312821b8265b06.zip
random: add get_random_{bytes,u32,u64,int,long,once}_wait family
These functions are simple convenience wrappers that call wait_for_random_bytes before calling the respective get_random_* function. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index abcfa46a2bd9..dda2cc939a53 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -274,6 +274,8 @@ do { \
#define net_get_random_once(buf, nbytes) \
get_random_once((buf), (nbytes))
+#define net_get_random_once_wait(buf, nbytes) \
+ get_random_once_wait((buf), (nbytes))
int kernel_sendmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec,
size_t num, size_t len);