summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2025-12-20 08:45:41 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-01-27 06:07:09 +0300
commitc243413740b39b0cf0a88732de5efc2b45716d81 (patch)
treeb80f322bdbb44a0b59f027d65b396bae91639a69
parentf34e19c34e4e92338d2ceaab2b95dd7790d262de (diff)
downloadlinux-c243413740b39b0cf0a88732de5efc2b45716d81.tar.xz
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>
-rw-r--r--lib/kfifo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kfifo.c b/lib/kfifo.c
index 525e66f8294c..2633f9cc336c 100644
--- a/lib/kfifo.c
+++ b/lib/kfifo.c
@@ -41,7 +41,7 @@ int __kfifo_alloc_node(struct __kfifo *fifo, unsigned int size,
return -EINVAL;
}
- fifo->data = kmalloc_array_node(esize, size, gfp_mask, node);
+ fifo->data = kmalloc_array_node(size, esize, gfp_mask, node);
if (!fifo->data) {
fifo->mask = 0;