summaryrefslogtreecommitdiff
path: root/net/sched/sch_pie.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-10-05 18:49:46 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2022-10-12 02:42:58 +0300
commit197173db990cad244221ba73c43b1df6170ae278 (patch)
treeb3a91c349a525ec3f660ecfc19bf9372e9cbb016 /net/sched/sch_pie.c
parenta251c17aa558d8e3128a528af5cf8b9d7caae4fd (diff)
downloadlinux-197173db990cad244221ba73c43b1df6170ae278.tar.xz
treewide: use get_random_bytes() when possible
The prandom_bytes() function has been a deprecated inline wrapper around get_random_bytes() for several releases now, and compiles down to the exact same code. Replace the deprecated wrapper with a direct call to the real function. This was done as a basic find and replace. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Yury Norov <yury.norov@gmail.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> # powerpc Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'net/sched/sch_pie.c')
-rw-r--r--net/sched/sch_pie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c
index 974038ba6c7b..265c238047a4 100644
--- a/net/sched/sch_pie.c
+++ b/net/sched/sch_pie.c
@@ -72,7 +72,7 @@ bool pie_drop_early(struct Qdisc *sch, struct pie_params *params,
if (vars->accu_prob >= (MAX_PROB / 2) * 17)
return true;
- prandom_bytes(&rnd, 8);
+ get_random_bytes(&rnd, 8);
if ((rnd >> BITS_PER_BYTE) < local_prob) {
vars->accu_prob = 0;
return true;