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@xxxxxxxxxxxxxxxxxx> --- drivers/scsi/ipr.c | 1 + 1 file changed, 1 insertion(+) Index: b/drivers/scsi/ipr.c =================================================================== --- a/drivers/scsi/ipr.c 2013-03-14 13:15:46.289276262 -0500 +++ b/drivers/scsi/ipr.c 2013-03-14 13:16:03.398966326 -0500 @@ -9728,6 +9728,7 @@ static void __ipr_remove(struct pci_dev 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); -- -- 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