]> Gentwo Git Trees - linux/.git/commit
powerpc/pseries/msi: Fix NULL pointer dereference at irq domain teardown
authorNam Cao <namcao@linutronix.de>
Fri, 10 Oct 2025 12:03:07 +0000 (12:03 +0000)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 13 Oct 2025 04:09:02 +0000 (09:39 +0530)
commitef3e73a917ec7d080e0fb0e4015098a4fb0f1cff
tree44d3b06abe73d03fdd13f22c3abbc8c961488466
parent3a8660878839faadb4f1a6dd72c3179c1df56787
powerpc/pseries/msi: Fix NULL pointer dereference at irq domain teardown

pseries_msi_ops_teardown() reads pci_dev* from msi_alloc_info_t. However,
pseries_msi_ops_prepare() does not populate this structure, thus it is all
zeros. Consequently, pseries_msi_ops_teardown() triggers a NULL pointer
dereference crash.

struct pci_dev is available in struct irq_domain. Read it there instead.

Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Closes: https://lore.kernel.org/linuxppc-dev/878d7651-433a-46fe-a28b-1b7e893fcbe0@linux.ibm.com/
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20251010120307.3281720-1-namcao@linutronix.de
arch/powerpc/platforms/pseries/msi.c