All of lore.kernel.org
 help / color / mirror / Atom feed
* + kfifo-fix-kmalloc_array_node-argument-order.patch added to mm-nonmm-unstable branch
@ 2025-12-20 19:23 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-12-20 19:23 UTC (permalink / raw)
  To: mm-commits, vbabka, stefani, rdunlap, akpm


The patch titled
     Subject: kfifo: fix kmalloc_array_node() argument order
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     kfifo-fix-kmalloc_array_node-argument-order.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/kfifo-fix-kmalloc_array_node-argument-order.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Randy Dunlap <rdunlap@infradead.org>
Subject: kfifo: fix kmalloc_array_node() argument order
Date: Fri, 19 Dec 2025 21:45:41 -0800

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>
---

 lib/kfifo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/kfifo.c~kfifo-fix-kmalloc_array_node-argument-order
+++ a/lib/kfifo.c
@@ -41,7 +41,7 @@ int __kfifo_alloc_node(struct __kfifo *f
 		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;
_

Patches currently in -mm which might be from rdunlap@infradead.org are

mm-leafopsh-correct-kernel-doc-function-param-names.patch
sparse-update-maintainers-info.patch
kernelh-drop-hexh-and-update-all-hexh-users.patch
kfifo-fix-kmalloc_array_node-argument-order.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-20 19:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-20 19:23 + kfifo-fix-kmalloc_array_node-argument-order.patch added to mm-nonmm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.