remove dead NULL checks after GFP_NOFAIL allocations and fix xive use-after-free
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 12 repliesApplied 4/6
- v14 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- 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().
Patches in v2 Applied · 4/6
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | powerpc/xive: remove dead NULL check after GFP_NOFAIL allocationarch/ | +1 | 4 replies | |
| 2/6 | powerpc/xive: add error return value to xive_smp_probe()arch/ arch/ | +5 | 1 reply | Applied |
| 3/6 | powerpc/xive: fix use-after-free of xive_ipisarch/ arch/ arch/ | +15 | 2 replies | |
| 4/6 | drm: remove dead WARN_ON NULL check after GFP_NOFAIL allocationdrivers/ | +0 | 0 replies | Applied |
| 5/6 | lib/test_hmm: remove dead NULL checks after GFP_NOFAIL allocationslib/ | +0 | 1 reply | Applied |
| 6/6 | RDMA/cxgb4: remove dead NULL checks after GFP_NOFAIL allocationsdrivers/ | +2 | 1 reply | Applied |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Wentao Guan | jiazhenyuan | Cédric Le Goater | Potnuri Bharat Teja | Alistair Popple | Mukesh Kumar Chaurasiya (IBM) |
|---|---|---|---|---|---|---|
| 1/6 | R-b | R-b | R-b | R-b | ||
| 2/6 | R-b | R-b | R-b | |||
| 3/6 | R-b | R-b | R-b | |||
| 4/6 | ||||||
| 5/6 | R-b | |||||
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [PATCH v2 0/6] remove dead NULL checks after GFP_NOFAIL allocations and fix xive use-after-free
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(-)
Signature · 1 line
2.20.1