android_kernel_samsung_msm8976/drivers
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
..
acorn
acpi [PATCH] x86_64: Support memory hotadd without sparsemem 2006-04-09 11:53:16 -07:00
amba
atm
base [PATCH] pm: print name of failed suspend function 2006-04-14 11:41:25 -07:00
block [PATCH] cciss: bug fix for crash when running hpacucli 2006-04-17 14:24:57 -07:00
bluetooth [PATCH] pcmcia: use bitfield instead of p_state and state 2006-03-31 17:26:33 +02:00
cdrom [PATCH] Overrun in cdrom/aztcd.c 2006-04-11 06:18:46 -07:00
char [PATCH] Open IPMI BT overflow 2006-04-19 09:13:52 -07:00
connector
cpufreq [CPUFREQ] drivers/cpufreq/cpufreq.c: static functions mustn't be exported 2006-04-18 17:24:52 -05:00
crypto
dio
edac [PATCH] edac_752x needs CONFIG_HOTPLUG 2006-03-31 12:18:54 -08:00
eisa
fc4
firmware [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/ 2006-04-14 11:41:25 -07:00
hwmon [PATCH] w83792d: Be quiet on misdetection 2006-04-14 11:18:33 -07:00
i2c [PATCH] m41t00: fix bitmasks when writing to chip 2006-04-19 09:13:49 -07:00
ide [PATCH] alim15x3: ULI M-1573 south Bridge support 2006-04-19 09:13:53 -07:00
ieee1394 [PATCH] sbp2: fix spinlock recursion 2006-04-02 12:58:09 -07:00
infiniband IB/mthca: make a function static 2006-04-19 11:40:12 -07:00
input Input: synaptics - limit rate to 40pps on Toshiba Protege M300 2006-04-02 00:10:18 -05:00
isdn [ISDN]: Static overruns in drivers/isdn/i4l/isdn_ppp.c 2006-04-11 17:29:17 -07:00
leds [PATCH] leds: reorganise Kconfig 2006-04-11 06:18:40 -07:00
macintosh
mca
md [PATCH] sysfs: Allow sysfs attribute files to be pollable 2006-04-14 11:41:24 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-04-11 06:41:02 -07:00
message [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc 2006-05-10 09:54:42 -05:00
mfd
misc
mmc [ARM] 3457/1: i.MX: SD/MMC support for i.MX/MX1 2006-04-02 19:27:07 +01:00
mtd [PATCH] Remove blkmtd 2006-04-11 06:18:43 -07:00
net [IRDA]: smsc-ircc2, smcinit support for ALi ISA bridges 2006-04-14 16:03:33 -07:00
nubus
oprofile
parisc [PARISC] I/O-Space must be ioremap_nocache()'d 2006-03-30 17:48:42 +00:00
parport [PATCH] parport_pc: fix section mismatch warnings (v2) 2006-04-19 09:13:52 -07:00
pci Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-04-14 17:08:18 -07:00
pcmcia [ARM] 3478/1: SharpSL SCOOP: Fix potenial build failure 2006-04-18 23:18:53 +01:00
pnp [PATCH] pnp: fix two messages in manager.c 2006-04-19 09:13:52 -07:00
rapidio
rtc [PATCH] RTC subsystem: VR41XX cleanup 2006-04-11 06:18:47 -07:00
s390 [PATCH] s390: minor tape fixes 2006-04-11 06:18:38 -07:00
sbus
scsi [SCSI] lpfc 8.1.6 : Fix Data Corruption in Bus Reset Path 2006-05-03 12:12:39 -05:00
serial [PATCH] m32r: Remove a warning in m32r_sio.c 2006-04-19 09:13:51 -07:00
sh
sn [PATCH] Last DMA_xBIT_MASK cleanups 2006-04-11 06:18:44 -07:00
spi
tc
telephony [PATCH] pcmcia: use bitfield instead of p_state and state 2006-03-31 17:26:33 +02:00
usb [PATCH] isd200: limit to BLK_DEV_IDE 2006-04-17 14:24:57 -07:00
video [PATCH] fbdev: Fix return error of fb_write 2006-04-19 09:13:54 -07:00
w1
zorro
Kconfig [PATCH] LED: add LED class 2006-03-31 12:18:56 -08:00
Makefile Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2006-04-02 12:51:22 -07:00