All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] remove dead NULL checks after GFP_NOFAIL allocations and fix xive use-after-free
@ 2026-07-24  2:28 Gou Hao
  2026-07-24  2:28 ` [PATCH v2 1/6] powerpc/xive: remove dead NULL check after GFP_NOFAIL allocation Gou Hao
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Gou Hao @ 2026-07-24  2:28 UTC (permalink / raw)
  To: maddy, mpe, npiggin, chleroy, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, bharat, jgg, leon, akpm, gouhao,
	namcao, ynorov, sshegde, nilay, clg
  Cc: linuxppc-dev, linux-kernel, dri-devel, linux-rdma, linux-mm,
	gouhaojake, kernel

Changes in v2:
- Remove the now-unused out_free_domain error label in the xive
  patch after deleting the unreachable NULL check goto.
- Fix a use-after-free of xive_ipis: when xive_init_ipis() fails,
  the error path frees xive_ipis but xive_smp_probe() ignores the
  error and proceeds to dereference it in xive_setup_cpu_ipi().
  Propagate the error return through xive_smp_probe() and check
  it in both pnv_smp_probe() and pSeries_smp_probe().

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.

Gou Hao (6):
  powerpc/xive: remove dead NULL check after GFP_NOFAIL allocation
  powerpc/xive: add error return value to xive_smp_probe()
  powerpc/xive: fix use-after-free of xive_ipis
  drm: remove dead WARN_ON NULL check after GFP_NOFAIL allocation
  lib/test_hmm: remove dead NULL checks after GFP_NOFAIL allocations
  RDMA/cxgb4: remove dead NULL checks after GFP_NOFAIL allocations

 arch/powerpc/include/asm/xive.h      |  4 ++--
 arch/powerpc/platforms/powernv/smp.c |  8 +++++---
 arch/powerpc/platforms/pseries/smp.c |  8 +++++---
 arch/powerpc/sysdev/xive/common.c    | 15 +++++++++------
 drivers/gpu/drm/drm_modeset_lock.c   |  4 ----
 drivers/infiniband/hw/cxgb4/mem.c    | 10 ++--------
 lib/test_hmm.c                       |  6 ------
 7 files changed, 23 insertions(+), 32 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-07-24  7:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24  2:28 [PATCH v2 0/6] remove dead NULL checks after GFP_NOFAIL allocations and fix xive use-after-free Gou Hao
2026-07-24  2:28 ` [PATCH v2 1/6] powerpc/xive: remove dead NULL check after GFP_NOFAIL allocation Gou Hao
2026-07-24  4:55   ` Cédric Le Goater
2026-07-24  2:28 ` [PATCH v2 2/6] powerpc/xive: add error return value to xive_smp_probe() Gou Hao
2026-07-24  4:55   ` Cédric Le Goater
2026-07-24  2:28 ` [PATCH v2 3/6] powerpc/xive: fix use-after-free of xive_ipis Gou Hao
2026-07-24  2:44   ` sashiko-bot
2026-07-24  4:58   ` Cédric Le Goater
2026-07-24  2:28 ` [PATCH v2 4/6] drm: remove dead WARN_ON NULL check after GFP_NOFAIL allocation Gou Hao
2026-07-24  2:28 ` [PATCH v2 5/6] lib/test_hmm: remove dead NULL checks after GFP_NOFAIL allocations Gou Hao
2026-07-24  2:28 ` [PATCH v2 6/6] RDMA/cxgb4: " Gou Hao
2026-07-24  2:53   ` sashiko-bot
2026-07-24  7:34   ` Potnuri Bharat Teja

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.