summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-10-09 20:45:07 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2022-12-20 03:13:45 +0100
commit3c202d14a9d73fb63c3dccb18feac5618c21e1c4 (patch)
tree53cdfe8283a913521cb567dc12872e2fd820ca52 /net
parent41a15855c1ee390a0ae9d0c29d32b451dd30a600 (diff)
downloadlinux-3c202d14a9d73fb63c3dccb18feac5618c21e1c4.tar.bz2
prandom: remove prandom_u32_max()
Convert the final two users of prandom_u32_max() that slipped in during 6.2-rc1 to use get_random_u32_below(). Then, with no more users left, we can finally remove the deprecated function. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_plb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_plb.c b/net/ipv4/tcp_plb.c
index bb1a08fda113..4bcf7eff95e3 100644
--- a/net/ipv4/tcp_plb.c
+++ b/net/ipv4/tcp_plb.c
@@ -97,7 +97,7 @@ void tcp_plb_update_state_upon_rto(struct sock *sk, struct tcp_plb_state *plb)
return;
pause = READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ;
- pause += prandom_u32_max(pause);
+ pause += get_random_u32_below(pause);
plb->pause_until = tcp_jiffies32 + pause;
/* Reset PLB state upon RTO, since an RTO causes a sk_rethink_txhash() call