lkml.org 
[lkml]   [2020]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 2/2] PCI: dwc: Fix race in removing chained IRQ handler
    Date
    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>
    ---
    drivers/pci/controller/dwc/pcie-designware-host.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
    index 44c2a6572199..fc2428165f13 100644
    --- a/drivers/pci/controller/dwc/pcie-designware-host.c
    +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
    @@ -258,10 +258,8 @@ int dw_pcie_allocate_domains(struct pcie_port *pp)

    void dw_pcie_free_msi(struct pcie_port *pp)
    {
    - if (pp->msi_irq) {
    - irq_set_chained_handler(pp->msi_irq, NULL);
    - irq_set_handler_data(pp->msi_irq, NULL);
    - }
    + if (pp->msi_irq)
    + irq_set_chained_handler_and_data(pp->msi_irq, NULL, NULL);

    irq_domain_remove(pp->msi_domain);
    irq_domain_remove(pp->irq_domain);
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-11-11 23:02    [W:2.396 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site