All of lore.kernel.org
 help / color / mirror / Atom feed
From: wenxiong@linux.vnet.ibm.com
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, brking@linux.vnet.ibm.com,
	klebers@linux.vnet.ibm.com,
	Wen Xiong <wenxiong@linux.vnet.ibm.com>
Subject: [PATCH 2/3] ipr: dlpar failed when adding an adapter back
Date: Thu, 14 Mar 2013 13:52:24 -0500	[thread overview]
Message-ID: <20130314185803.399503691@linux.vnet.ibm.com> (raw)
In-Reply-To: 20130314185222.994529433@linux.vnet.ibm.com

[-- Attachment #1: reinit_used_res_q --]
[-- Type: text/plain, Size: 883 bytes --]

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>
---
 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);

-- 

  parent reply	other threads:[~2013-03-14 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 18:52 [PATCH 0/3] Fixed several ipr bugs when bring up an ipr adapter wenxiong
2013-03-14 18:52 ` [PATCH 1/3] ipr: fix addition of abort command to HRRQ free queue wenxiong
2013-03-21 13:52   ` Brian King
2013-03-14 18:52 ` wenxiong [this message]
2013-03-14 18:52 ` [PATCH 3/3] ipr: Avoid target_destroy accessing memory after it was freed wenxiong
2013-05-09 16:32   ` wenxiong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130314185803.399503691@linux.vnet.ibm.com \
    --to=wenxiong@linux.vnet.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=klebers@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.