linux/drivers
Matthew Wilcox 6b7f123f37 [SCSI] Fix async scanning double-add problems
Stress-testing and some thought has revealed some places where
asynchronous scanning needs some more attention to locking.

 - Since async_scan is a bit, we need to hold the host_lock while
   modifying it to prevent races against other CPUs modifying the word
   that bit is in.  This is probably a theoretical race for the moment,
   but other patches may change that.
 - The async_scan bit means not only that this host is being scanned
   asynchronously, but that all the devices attached to this host are not
   yet added to sysfs.  So we must ensure that this bit is always in sync.
   I've chosen to do this with the scan_mutex since it's already acquired
   in most of the right places.
 - If the host changes state to deleted while we're in the middle of
   a scan, we'll end up with some devices on the host's list which must
   be deleted.  Add a check to scsi_sysfs_add_devices() to ensure the
   host is still running.
 - To avoid the async_scan bit being protected by three locks, the
   async_scan_lock now only protects the scanning_list.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:38:24 -04:00
..
acorn/char Remove the arm26 port 2007-07-31 15:39:39 -07:00
acpi ACPI: EC: Fix "no battery" regression 2007-08-14 01:03:42 -04:00
amba
ata [ARM] pata_icside: fix the FIXMEs 2007-08-06 16:10:54 +01:00
atm [ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc 2007-08-13 22:52:13 -07:00
auxdisplay
base CPU online file permission 2007-07-31 15:39:39 -07:00
block sysace: HDIO_GETGEO has it's own method for ages 2007-08-11 22:34:48 +02:00
bluetooth
cdrom
char pull asus sony thinkpad into release branch 2007-08-12 00:17:12 -04:00
clocksource
connector
cpufreq
crypto
dio
dma [NET_DMA]: remove unused dma_memcpy_to_kernel_iovec 2007-07-31 02:28:03 -07:00
edac
eisa
fc4
firewire firewire: fw-core: make two variables static 2007-08-02 20:34:17 +02:00
firmware
hid HID: Never call hid_free_buffers() when usbhid_device has been freed 2007-08-02 13:48:04 +02:00
hwmon hwmon: fscher read control bugfix 2007-07-30 21:14:00 -04:00
i2c i2c-s3c2410: Build fix 2007-08-14 18:37:15 +02:00
ide scc_pata: PIO fixes 2007-08-01 23:46:46 +02:00
ieee1394 ieee1394: sbp2: more correct Kconfig dependencies 2007-08-02 20:34:16 +02:00
infiniband [SCSI] transport_srp: add rport roles attribute 2007-10-12 14:37:46 -04:00
input [MIPS] Fixup secure computing stuff. 2007-07-31 21:35:21 +01:00
isdn Remove 'isdn_* is defined but unused' warnings 2007-07-31 15:39:44 -07:00
kvm KVM: x86 emulator: fix debug reg mov instructions 2007-08-06 17:54:41 -07:00
leds
lguest i386: Make patching more robust, fix paravirt issue 2007-08-11 15:58:13 -07:00
macintosh
mca
md Fix remap handling by blktrace 2007-08-11 22:34:48 +02:00
media
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2007-08-06 17:48:34 -07:00
mfd
misc pull asus sony thinkpad into release branch 2007-08-12 00:17:12 -04:00
mmc mmc: at91_mci: remove whitespace at the end of lines 2007-08-09 16:13:44 +02:00
mtd mtdchar build fix 2007-08-11 15:47:41 -07:00
net Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-08-14 09:31:19 -07:00
nubus
of
oprofile
parisc
parport parport_pc locking fix 2007-07-31 15:39:37 -07:00
pci pci: rename __pci_reenable_device() to pci_reenable_device() 2007-08-01 10:00:56 -04:00
pcmcia pcmcia: give socket time to power down 2007-07-31 15:39:38 -07:00
pnp
power
ps3
rapidio
rtc rtc-m48t59 driver NO_IRQ mode fixup 2007-07-31 15:39:44 -07:00
s390 [SCSI] zfcp: fix the data buffer accessor patch 2007-08-15 12:28:44 -05:00
sbus Videopix Frame Grabber: Fix unreleased lock in vfc_debug() 2007-07-31 15:39:43 -07:00
scsi [SCSI] Fix async scanning double-add problems 2007-10-12 14:38:24 -04:00
serial serial: fix 8250 early console setup 2007-08-03 15:02:56 -07:00
sh
sn
spi spidev warning fix 2007-08-11 15:47:42 -07:00
tc
telephony
uio
usb [SCSI] microtek: use data accessors and !use_sg cleanup 2007-10-12 14:38:21 -04:00
video matroxfb: rectify jitter (G450/G550) 2007-08-11 15:47:40 -07:00
w1
xen
zorro
Kconfig
Makefile