Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kfifo: fix kmalloc_array_node() argument order

To be consistent, pass the kmalloc_array_node() parameters in the order
(number_of_elements, element_size). Since only the product of the two
values is used, this is not a bug fix.

Link: https://lkml.kernel.org/r/20251220054541.2295599-1-rdunlap@infradead.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216015
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Randy Dunlap and committed by
Andrew Morton
c2434137 f34e19c3

+1 -1
+1 -1
lib/kfifo.c
··· 41 41 return -EINVAL; 42 42 } 43 43 44 - fifo->data = kmalloc_array_node(esize, size, gfp_mask, node); 44 + fifo->data = kmalloc_array_node(size, esize, gfp_mask, node); 45 45 46 46 if (!fifo->data) { 47 47 fifo->mask = 0;