]> err.no Git - linux-2.6/commitdiff
[SCSI] SRP transport: only remove our own entries
authorDave Dillow <dillowda@ornl.gov>
Fri, 4 Jan 2008 02:34:49 +0000 (21:34 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 4 Jan 2008 20:15:51 +0000 (14:15 -0600)
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>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_transport_srp.c

index 44a340bd937b9fb43752ccceb1427c25341f92bc..65c584db33bd6d3348bdfd4b14fd2c35634c584f 100644 (file)
@@ -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;
 }