[to-be-updated] powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.patch removed from -mm tree
Andrew Morton <[email protected]> Sun, 26 Jul 2026 20:07:22 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: powerpc/xive: remove dead NULL check after GFP_NOFAIL allocation
has been removed from the -mm tree. Its filename was
powerpc-xive-remove-dead-null-check-after-gfp_nofail-allocation.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Gou Hao <[email protected]>
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/[email protected]
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Gou Hao <[email protected]>
Reviewed-by: Wentao Guan <[email protected]>
Reviewed-by: jiazhenyuan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Cc: Bharat Potnuri <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Leon Romanovsky <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Nam Cao <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Nilay Shroff <[email protected]>
Cc: Shrikanth Hegde <[email protected]>
Cc: Thomas Zimemrmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
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 [email protected] are
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