Message ID | 20210115212435.19940-1-martin@kaiser.cx (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | [v4,1/3] PCI: altera-msi: Remove IRQ handler and data in one go | expand |
On Fri, 15 Jan 2021 22:24:33 +0100, Martin Kaiser wrote: > 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"). Applied to pci/misc, thanks! [1/3] PCI: altera-msi: Remove IRQ handler and data in one go https://git.kernel.org/lpieralisi/pci/c/3f0ea2360e [2/3] PCI: dwc: Remove IRQ handler and data in one go https://git.kernel.org/lpieralisi/pci/c/ad1cc6b75a [3/3] PCI: xgene-msi: Fix race in installing chained irq handler https://git.kernel.org/lpieralisi/pci/c/a93c00e5f9 Thanks, Lorenzo
diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/controller/pcie-altera-msi.c index e1636f7714ca..42691dd8ebef 100644 --- a/drivers/pci/controller/pcie-altera-msi.c +++ b/drivers/pci/controller/pcie-altera-msi.c @@ -204,8 +204,7 @@ static int altera_msi_remove(struct platform_device *pdev) struct altera_msi *msi = platform_get_drvdata(pdev); msi_writel(msi, 0, MSI_INTMASK); - irq_set_chained_handler(msi->irq, NULL); - irq_set_handler_data(msi->irq, NULL); + irq_set_chained_handler_and_data(msi->irq, NULL, NULL); altera_free_domains(msi);
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> --- Hi Lorenzo, here's another bunch of simple patches that were discussed in November. Could you have a look? Thanks, Martin v4: - resend after two months - capitalize the commit message properly v3: - rewrite the commit message again. this is no race condition if we remove the interrupt handler. sorry for the noise. v2: - rewrite the commit message to clarify that this is a bugfix drivers/pci/controller/pcie-altera-msi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)