diff mbox series

[v3] PCI: brcmstb: remove chained IRQ handler and data in one go

Message ID 20201112220306.9371-1-martin@kaiser.cx
State New
Headers show
Series [v3] PCI: brcmstb: remove chained IRQ handler and data in one go | expand

Commit Message

Martin Kaiser Nov. 12, 2020, 10:03 p.m. UTC
Call irq_set_chained_handler_and_data() to clear the chained handler
and the handler's data under irq_desc->lock.

See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained
IRQ handler").

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
 - rewrite the commit message again. this is no race condition if we
   remove the interrupt handler. sorry for the noise.
 - rewrite the commit message to clarify that this is a bugfix

 drivers/pci/controller/pcie-brcmstb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index bea86899bd5d..7c666f4deb47 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -606,8 +606,7 @@  static void brcm_msi_remove(struct brcm_pcie *pcie)
 	if (!msi)
-	irq_set_chained_handler(msi->irq, NULL);
-	irq_set_handler_data(msi->irq, NULL);
+	irq_set_chained_handler_and_data(msi->irq, NULL, NULL);