Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9077a944 authored by wenxiong@linux.vnet.ibm.com's avatar wenxiong@linux.vnet.ibm.com Committed by James Bottomley
Browse files

[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: default avatarWen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent c4ee22a3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);