mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Dillow <dillowda@ornl.gov>
To: linux-scsi@vger.kernel.org
Cc: tomof@acm.org, rdreier@cisco.com, linux-kernel@vger.kernel.org,
	general@lists.openfabrics.org,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [2.6.24-rc BUGFIX] SRP transport: only remove our own entries
Date: Thu, 03 Jan 2008 21:34:49 -0500	[thread overview]
Message-ID: <1199414089.3636.7.camel@obelisk.thedillows.org> (raw)
In-Reply-To: <20080104094722F.fujita.tomonori@lab.ntt.co.jp>

The SCSI SRP transport class currently iterates over all children
devices of the host that is being removed in srp_remove_host(). However,
not all of those children were created by the SRP transport, and
removing them will cause corruption and an oops when their creator tries
to remove them.

Signed-off-by: David Dillow <dillowda@ornl.gov>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
On Fri, 2008-01-04 at 09:47 +0900, FUJITA Tomonori wrote:
> On Thu, 03 Jan 2008 15:51:25 -0500
> I think that this is the root problem and the patch fixes it in the
> right way. Please send this patch to linux-scsi@vger.kernel.org and a
> patch to move srp_remove_host before scsi_remove_host in
> srp_remove_one to Roland.
> 
> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
index 44a340b..65c584d 100644
--- a/drivers/scsi/scsi_transport_srp.c
+++ b/drivers/scsi/scsi_transport_srp.c
@@ -265,7 +265,8 @@ EXPORT_SYMBOL_GPL(srp_rport_del);
 
 static int do_srp_rport_del(struct device *dev, void *data)
 {
-	srp_rport_del(dev_to_rport(dev));
+	if (scsi_is_srp_rport(dev))
+		srp_rport_del(dev_to_rport(dev));
 	return 0;
 }
 


  reply	other threads:[~2008-01-04  2:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21 21:52 list corruption on ib_srp load in v2.6.24-rc5 David Dillow
2007-12-21 21:54 ` David Dillow
2007-12-21 22:18 ` David Dillow
2007-12-22 15:15   ` [ofa-general] " Pete Wyckoff
2007-12-22 16:41   ` FUJITA Tomonori
2007-12-22 17:32     ` Dave Dillow
2007-12-26 17:14     ` David Dillow
2007-12-27  2:58       ` FUJITA Tomonori
2007-12-27 17:53         ` David Dillow
2008-01-02 17:51       ` Roland Dreier
2008-01-03  8:30         ` FUJITA Tomonori
2008-01-03 20:09           ` [ofa-general] " David Dillow
2008-01-03 20:51             ` David Dillow
2008-01-03 21:33               ` Roland Dreier
2008-01-04  0:47               ` FUJITA Tomonori
2008-01-04  2:34                 ` Dave Dillow [this message]
2008-01-04  2:54                   ` [2.6.24-rc BUGFIX] SRP transport: only remove our own entries FUJITA Tomonori
2008-01-04  2:39                 ` [2.6.24-rc BUGFIX] IB/srp: release transport when removing host Dave Dillow
2008-01-04  2:54                   ` FUJITA Tomonori
2008-01-04  3:35                     ` [2.6.24-rc minor bugfix] IB/srp: release transport before " Dave Dillow
2008-01-08 20:09                       ` Roland Dreier
2007-12-21 22:21 ` [ofa-general] list corruption on ib_srp load in v2.6.24-rc5 Roland Dreier

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=1199414089.3636.7.camel@obelisk.thedillows.org \
    --to=dillowda@ornl.gov \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=general@lists.openfabrics.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=tomof@acm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®