Skip to contentSkip to conversation

zfcp: correctly set this_id for hosts

PATCH New Andreas Herrmann 1 participant 1 message Mar 2, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zfcp: correctly set this_id for hosts

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.

---

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

c72e15b96925b812528f8877c13174992e1d3a42

drivers/s390/scsi/zfcp_scsi.c +1 -1
index 9f6b4d7..a2de3c9 100644
@@ -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?
Signature · 1 line
0.99.9n-g5a22