Skip to content

Commit

Permalink
[SCSI] ipr: dlpar failed when adding an adapter back
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wenxiong@linux.vnet.ibm.com authored and James Bottomley committed Apr 6, 2013
1 parent c4ee22a commit 9077a94
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9077a94

Please sign in to comment.