Re: [PATCH 31/35] qla2xxx: Disable PCI device in shutdown handler.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Sep 2014 11:37:55 -0400
Chad Dupuis <chad.dupuis@xxxxxxxxxx> wrote:

> 
> 
> On Wed, 24 Sep 2014, Joe Lawrence wrote:
> 
> > On Wed, 24 Sep 2014 03:08:34 -0400
> > Saurav Kashyap <saurav.kashyap@xxxxxxxxxx> wrote:
> >
> >> From: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
> >>
> >> Disable the PCI device during shutdown to prevent any races with
> >> other PCI code such as the AER handling code.
> >>
> >> Signed-off-by: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
> >> Signed-off-by: Saurav Kashyap <saurav.kashyap@xxxxxxxxxx>
> >> ---
> >>  drivers/scsi/qla2xxx/qla_os.c |    3 +++
> >>  1 files changed, 3 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> >> index 08c8e9c..70445bc 100644
> >> --- a/drivers/scsi/qla2xxx/qla_os.c
> >> +++ b/drivers/scsi/qla2xxx/qla_os.c
> >> @@ -3037,6 +3037,9 @@ qla2x00_shutdown(struct pci_dev *pdev)
> >>  	qla2x00_free_irqs(vha);
> >>
> >>  	qla2x00_free_fw_dump(ha);
> >> +
> >> +	pci_disable_pcie_error_reporting(pdev);
> >> +	pci_disable_device(pdev);
> >>  }
> >>
> >>  /* Deletes all the virtual ports for a given ha */
> >
> > Hi Saurav,
> >
> > Just curious if there were any bug report instances to go along with
> > this patch?  (Or a short explanation of the race.)
> 
> Joe,
> 
> The race here was during reboot after taking a crash dump.  We hit an AER 
> condition so the driver's AER handler is called after we've already 
> shutdown the adapter which causes us to try to free some already freed 
> structs.  To prevent this we disable the PCI function from the shutdown 
> handler.

Hi Chad,

Could the driver's AER handler get invoked after qla2x00_free_fw_dump,
but before pci_disable_pcie_error_reporting (ie, is there anything to
hold off .shutdown from running at the same time as the AER callbacks)?

Thanks,

-- Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux