Commit 302d55d5 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

slab: use 32-bit arithmetic in freelist_randomize()

SLAB doesn't support 4GB+ of objects per slab, therefore randomization
doesn't need size_t.


Signed-off-by: default avatarAlexey Dobriyan <>
Acked-by: default avatarChristoph Lameter <>
Cc: Pekka Enberg <>
Cc: David Rientjes <>
Cc: Joonsoo Kim <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 870b1fbb
......@@ -1186,10 +1186,10 @@ EXPORT_SYMBOL(kmalloc_order_trace);
/* Randomize a generic freelist */
static void freelist_randomize(struct rnd_state *state, unsigned int *list,
size_t count)
unsigned int count)
size_t i;
unsigned int rand;
unsigned int i;
for (i = 0; i < count; i++)
list[i] = i;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment