android_kernel_motorola_sm6225/drivers/message/fusion
mdr@sgi.com 6dd727da92 [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc
A race condition exists in mptfc between the thread registering a device
with the fc transport and the scan work generated by the transport.
This race existed prior to the application of the mptfc bug fix patch.

mptfc_register_dev() calls fc_remote_port_add() with the FC_RPORT_ROLE_TARGET
bit set in the rport ids passed to the function.  Having this bit set causes
fc_remote_port_add() to schedule a scan of the device.

This scan can execute before mptfc_register_dev() can fill in the dd_data
in the rport structure.  When this happens, mptfc_target_alloc() will fail
because dd_data is null.

Attached is a patch which fixes the problem.  The patch changes the rport ids
passed to fc_remote_port_add() to not have the TARGET bit set.  This prevents
the scan from being scheduled.  After mptfc_register_dev() fills in the rport
dd_data field, fc_remote_port_rolechg() is called, changing the role of the
rport to TARGET.  Thus, the scan is scheduled after dd_data is filled
in which prevents the failure in mptfc_target_alloc().

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-10 09:54:42 -05:00
..
lsi [SCSI] fusion - loginfo header update 2006-03-14 14:27:21 -06:00
Kconfig [SCSI] mptspi: Add transport class Domain Validation 2006-03-01 09:44:04 -06:00
linux_compat.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [SCSI] fusion - move some debug firmware event debug msgs to verbose level 2006-03-14 14:27:43 -06:00
mptbase.c [SCSI] fusion - bug fix stack overflow in mptbase 2006-04-27 13:59:30 -05:00
mptbase.h [SCSI] - fusion - mptfc bug fix's to prevent deadlock situations 2006-04-25 18:07:32 -05:00
mptctl.c [SCSI] fusion - static fix's 2006-03-14 14:33:18 -06:00
mptctl.h [SCSI] fusion - mptctl - adding support for bus_type=SAS 2006-02-04 16:31:29 -06:00
mptfc.c [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc 2006-05-10 09:54:42 -05:00
mptlan.c [SCSI] fusion - mptlan - remove wierd humor print 2006-02-27 22:55:04 -06:00
mptlan.h [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason 2005-11-09 07:55:57 -08:00
mptsas.c [SCSI] mptfusion: bug fix's for raid components adding/deleting 2006-04-25 18:00:39 -05:00
mptscsih.c [SCSI] - fusion - mptfc bug fix's to prevent deadlock situations 2006-04-25 18:07:32 -05:00
mptscsih.h [SCSI] fusion - exposing raid components in mptsas 2006-03-14 14:35:01 -06:00
mptspi.c [SCSI] mptspi: revalidate negotiation parameters after host reset and resume 2006-05-03 12:11:51 -05:00