[PATCH] zfcp: correctly set this_id for hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch is for 2.6.16.

It fixes a bug in zfcp which provokes a race
in scsi_scan.c. Finally this can lead to an Oops like:

kernel BUG at fs/sysfs/symlink.c:87!
...
sysfs_create_link+0x16e/0x1c4
class_device_add+0x194/0x3b8
attribute_container_add_class_device+0x26/0x50
transport_add_class_device+0x34/0x6c
attribute_container_device_trigger+0x170/0x174
scsi_alloc_target+0x22c/0x360
__scsi_add_device+0x3a/0x148
scsi_add_device+0x2c/0x54
zfcp_erp_thread+0xb90/0x152c
kernel_thread_starter+0x6/0xc

Please apply. Thanks!


Regards,

Andreas


zfcp: correctly set this_id for hosts

Correctly set this_id for the host. Otherwise we provoke
a race between scsi_target_reap_work and concurrent
scsi_add_device.


Signed-off-by: Andreas Herrmann <aherrman@xxxxxxxxxx>

---

 drivers/s390/scsi/zfcp_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

c72e15b96925b812528f8877c13174992e1d3a42
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 9f6b4d7..a2de3c9 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -68,7 +68,7 @@ struct zfcp_data zfcp_data = {
 	      eh_host_reset_handler:   zfcp_scsi_eh_host_reset_handler,
 			               /* FIXME(openfcp): Tune */
 	      can_queue:               4096,
-	      this_id:	               0,
+	      this_id:	               -1,
 	      /*
 	       * FIXME:
 	       * one less? can zfcp_create_sbale cope with it?
-- 
0.99.9n-g5a22
-
: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux