]> git.hungrycats.org Git - linux/commit
powerpc/eeh: avoid possible crash when edev->pdev changes
authorGanesh Goudar <ganeshgr@linux.ibm.com>
Mon, 17 Jun 2024 14:02:40 +0000 (19:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2024 07:53:37 +0000 (09:53 +0200)
commit428d940a8b6b3350b282c14d3f63350bde65c48b
treeb8af431c4887059a06a32cc9337d60178511b1ac
parent0f5892212c27be31792ef1daa89c8dac1b3047e4
powerpc/eeh: avoid possible crash when edev->pdev changes

[ Upstream commit a1216e62d039bf63a539bbe718536ec789a853dd ]

If a PCI device is removed during eeh_pe_report_edev(), edev->pdev
will change and can cause a crash, hold the PCI rescan/remove lock
while taking a copy of edev->pdev->bus.

Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240617140240.580453-1-ganeshgr@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/eeh_pe.c