* + powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.patch added to mm-nonmm-unstable branch
@ 2026-07-26 3:30 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-07-26 3:30 UTC (permalink / raw)
To: mm-commits, tzimmermann, sshegde, npiggin, nilay, namcao, mripard,
mpe, maddy, maarten.lankhorst, leon, jiazhenyuan, jgg, guanwentao,
clg, bharat, airlied, gouhao, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3890 bytes --]
The patch titled
Subject: powerpc/xive: remove dead NULL check after GFP_NOFAIL allocation
has been added to the -mm mm-nonmm-unstable branch. Its filename is
powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.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: Gou Hao <gouhao@uniontech.com>
Subject: powerpc/xive: remove dead NULL check after GFP_NOFAIL allocation
Date: Fri, 24 Jul 2026 10:28:46 +0800
Patch series "remove dead NULL checks after GFP_NOFAIL allocations and fix
xive use-after-free", v2.
This is a code cleanup series that removes unreachable NULL checks (and
associated error handling) that follow allocations using __GFP_NOFAIL,
which guarantees non-NULL return.
This patch (of 6):
kzalloc_objs with the __GFP_NOFAIL flag will never return NULL, so the
subsequent NULL check is unreachable dead code. Remove it.
Link: https://lore.kernel.org/20260724022851.466017-1-gouhao@uniontech.com
Link: https://lore.kernel.org/20260724022851.466017-2-gouhao@uniontech.com
Signed-off-by: Gou Hao <gouhao@uniontech.com>
Reviewed-by: Wentao Guan <guanwentao@uniontech.com>
Reviewed-by: jiazhenyuan <jiazhenyuan@uniontech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Cc: Bharat Potnuri <bharat@chelsio.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nam Cao <namcao@linutronix.de>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Nilay Shroff <nilay@linux.ibm.com>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Thomas Zimemrmann <tzimmermann@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/sysdev/xive/common.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/arch/powerpc/sysdev/xive/common.c~powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation
+++ a/arch/powerpc/sysdev/xive/common.c
@@ -1134,9 +1134,6 @@ static int __init xive_init_ipis(void)
xive_ipis = kzalloc_objs(*xive_ipis, nr_node_ids,
GFP_KERNEL | __GFP_NOFAIL);
- if (!xive_ipis)
- goto out_free_domain;
-
for_each_node(node) {
struct xive_ipi_desc *xid = &xive_ipis[node];
struct xive_ipi_alloc_info info = { node };
@@ -1158,7 +1155,7 @@ static int __init xive_init_ipis(void)
out_free_xive_ipis:
kfree(xive_ipis);
-out_free_domain:
+ xive_ipis = NULL;
irq_domain_remove(ipi_domain);
out_free_fwnode:
irq_domain_free_fwnode(fwnode);
_
Patches currently in -mm which might be from gouhao@uniontech.com are
powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.patch
powerpc-xive-add-error-return-value-to-xive_smp_probe.patch
powerpc-xive-fix-use-after-free-of-xive_ipis.patch
drm-remove-dead-warn_on-null-check-after-gfp_nofail-allocation.patch
lib-test_hmm-remove-dead-null-checks-after-gfp_nofail-allocations.patch
rdma-cxgb4-remove-dead-null-checks-after-gfp_nofail-allocations.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-26 3:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 3:30 + powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.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.