diff options
author | wenxiong@linux.vnet.ibm.com <wenxiong@linux.vnet.ibm.com> | 2013-03-14 19:52:24 +0100 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-04-06 12:25:37 +0200 |
commit | 9077a944bc3c8bea45a91dc2caa65e96ac4c5f87 (patch) | |
tree | dffa7cf509eb2fdc0533ce6eea2544b9dcc03353 /drivers/scsi/ipr.c | |
parent | [SCSI] ipr: fix addition of abort command to HRRQ free queue (diff) | |
download | linux-9077a944bc3c8bea45a91dc2caa65e96ac4c5f87.tar.xz linux-9077a944bc3c8bea45a91dc2caa65e96ac4c5f87.zip |
[SCSI] ipr: dlpar failed when adding an adapter back
Reinitialize resource queue prior to freeing resource entries to ensure they
are not referenced. This fixes an issue with target_destoy accessing memory
after it was freed.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 21e0a0ae43a8..2197b57fb225 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -9728,6 +9728,7 @@ static void __ipr_remove(struct pci_dev *pdev) spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); flush_work(&ioa_cfg->work_q); + INIT_LIST_HEAD(&ioa_cfg->used_res_q); spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); spin_lock(&ipr_driver_lock); |