aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/stream.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-10-20 17:49:10 -0700
committerJakub Kicinski <kuba@kernel.org>2022-10-20 17:49:10 -0700
commit94adb5e29e0e583283183dbaa852ee9d7d0c4c26 (patch)
tree3038a63f3ed9632711100f1187c4c53c304b785b /net/core/stream.c
parentnet: ipa: Proactively round up to kmalloc bucket size (diff)
parentMerge tag 'net-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadwireguard-linux-94adb5e29e0e583283183dbaa852ee9d7d0c4c26.tar.xz
wireguard-linux-94adb5e29e0e583283183dbaa852ee9d7d0c4c26.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/stream.c')
-rw-r--r--net/core/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/stream.c b/net/core/stream.c
index 1105057ce00a..75fded8495f5 100644
--- a/net/core/stream.c
+++ b/net/core/stream.c
@@ -123,7 +123,7 @@ int sk_stream_wait_memory(struct sock *sk, long *timeo_p)
DEFINE_WAIT_FUNC(wait, woken_wake_function);
if (sk_stream_memory_free(sk))
- current_timeo = vm_wait = (prandom_u32() % (HZ / 5)) + 2;
+ current_timeo = vm_wait = prandom_u32_max(HZ / 5) + 2;
add_wait_queue(sk_sleep(sk), &wait);