Messages in this thread | | | Date | Tue, 13 Dec 2022 15:02:52 +0000 | From | Matthew Wilcox <> | Subject | Re: [PATCH v2 1/3] Replace invocation of weak PRNG in mm/slab.c |
| |
On Tue, Dec 13, 2022 at 12:34:57PM +0200, david.keisarschm@mail.huji.ac.il wrote: > From: David <david.keisarschm@mail.huji.ac.il>
It's normal to include the surname in your sign-off, fwiw.
> @@ -2447,7 +2443,7 @@ static bool shuffle_freelist(struct kmem_cache *cachep, struct slab *slab) > > /* Fisher-Yates shuffle */ > for (i = count - 1; i > 0; i--) { > - rand = prandom_u32_state(&state.rnd_state); > + rand = get_random_u32(); > rand %= (i + 1);
Shouldn't this be "rand = get_random_u32_below(i + 1)"?
> swap_free_obj(slab, i, rand); > } > -- > 2.38.0 > >
| |