Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[SCSI] SRP transport: only remove our own entries

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>

authored by

Dave Dillow and committed by
James Bottomley
91183344 439f61b9

+2 -1
+2 -1
drivers/scsi/scsi_transport_srp.c
··· 265 265 266 266 static int do_srp_rport_del(struct device *dev, void *data) 267 267 { 268 - srp_rport_del(dev_to_rport(dev)); 268 + if (scsi_is_srp_rport(dev)) 269 + srp_rport_del(dev_to_rport(dev)); 269 270 return 0; 270 271 } 271 272