android_kernel_motorola_sm6225/drivers
FUJITA Tomonori 3d164fb09b [SCSI] ch: fix ch_remove oops
The following commit causes ch_remove oops:

commit 24b42566c3
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date:   Fri May 16 17:55:12 2008 -0700

    SCSI: fix race in device_create

    There is a race from when a device is created with device_create() and
    then the drvdata is set with a call to dev_set_drvdata() in which a
    sysfs file could be open, yet the drvdata will be NULL, causing all
    sorts of bad things to happen.

    This patch fixes the problem by using the new function,
    device_create_drvdata().  It fixes the problem in all of the scsi
    drivers that need it.

    Cc: Kay Sievers <kay.sievers@vrfy.org>
    Cc: Doug Gilbert <dgilbert@interlog.com>
    Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

The problem is ch_probe stores ch's private data at a wrong place.

We need to store it at scsi_device->sdev_gendev but the above patch
stores it at device struct that device_create_drvdata returns. So we
hit an oops when ch_remove accesses
scsi_device->sdev_gendev->driver_data, which is NULL.

Actually, there wasn't a race because ch doesn't create sysfs files
with device struct that device_create returns. This patch puts back
dev_set_drvdata() to set ch's private data properly.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-26 15:17:47 -04:00
..
accessibility
acpi Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6 2008-07-24 13:57:37 -07:00
amba
ata Fix ahci driver 'flags' type 2008-07-25 10:56:36 -07:00
atm atm: [fore200e] use MODULE_FIRMWARE() and other suggested cleanups 2008-07-23 20:29:21 -07:00
auxdisplay auxdisplay: small cleanups 2008-07-24 10:47:41 -07:00
base firmware: use memory_read_from_buffer() 2008-07-25 10:53:44 -07:00
block aoe: convert emsgs_sema into a completion 2008-07-25 10:53:45 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
cdrom
char Merge git://git.infradead.org/embedded-2.6 2008-07-25 12:02:08 -07:00
clocksource Fix printk format warning in clocksource/acpi_pm.c 2008-07-15 11:01:39 -07:00
connector
cpufreq Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-23 18:37:44 -07:00
cpuidle sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
crypto crypto: ixp4xx - Select CRYPTO_AUTHENC 2008-07-13 20:12:11 +08:00
dca Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2008-07-23 12:03:18 -07:00
dio dio: use dio_match_device() in dio_bus_match() 2008-07-20 17:24:40 -07:00
dma I/OAT: I/OAT version 3.0 support 2008-07-22 17:30:57 -07:00
edac edac: mpc85xx fix pci ofdev 2nd pass 2008-07-25 10:53:49 -07:00
eisa driver core: remove DEVICE_NAME_SIZE define 2008-07-21 21:54:53 -07:00
firewire Merge branch 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-07-15 12:39:44 -07:00
firmware dell_rbu: use memory_read_from_buffer() 2008-07-25 10:53:44 -07:00
gpio gpio: max732x driver 2008-07-25 10:53:30 -07:00
gpu drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
hid Merge branches 'upstream' and 'upstream-fixes' into for-linus 2008-07-23 15:26:10 +02:00
hwmon device create: hwmon: convert device_create to device_create_drvdata 2008-07-21 21:54:42 -07:00
i2c gpiolib: allow user-selection 2008-07-25 10:53:30 -07:00
ide ide: use proper printk() KERN_* levels in ide-probe.c 2008-07-24 22:53:36 +02:00
ieee1394 PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2008-07-24 12:56:07 -07:00
input Undo duplicate "m68k: drivers/input/serio/hp_sdc.c needs <linux/semaphore.h>" 2008-07-25 09:19:36 -07:00
isdn Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
leds leds: Ensure led->trigger is set earlier 2008-07-23 09:49:56 +01:00
lguest virtio: Add transport feature handling stub for virtio_ring. 2008-07-25 12:06:14 +10:00
macintosh device create: macintosh: convert device_create to device_create_drvdata 2008-07-21 21:54:43 -07:00
mca driver core: remove DEVICE_NAME_SIZE define 2008-07-21 21:54:53 -07:00
md [SCSI] scsi_dh: attach to hardware handler from dm-mpath 2008-07-26 15:14:53 -04:00
media PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
memstick driver core: remove DEVICE_ID_SIZE define 2008-07-21 21:54:53 -07:00
message I2O: handle sysfs_create_link() failures 2008-07-24 10:47:30 -07:00
mfd MFD_TC6393XB is ARM-only 2008-07-25 17:39:36 -07:00
misc drivers/misc/phantom: note PCI 2008-07-25 10:53:44 -07:00
mmc sdhci: highmem capable PIO routines 2008-07-23 14:42:09 +02:00
mtd Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2008-07-25 11:02:17 -07:00
net Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2008-07-25 11:08:17 -07:00
nubus
of Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2008-07-25 11:08:17 -07:00
oprofile
parisc
parport parport: fix platform driver hotplug/coldplug 2008-07-25 10:53:28 -07:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-24 13:57:13 -07:00
pcmcia PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
pnp PNPACPI: add support for HP vendor-specific CCSR descriptors 2008-07-16 23:27:07 +02:00
power drivers/power: fix platform driver hotplug/coldplug 2008-07-25 10:53:28 -07:00
ps3
rapidio rapidio: fix device reference counting 2008-07-10 18:04:43 -07:00
rtc rtc-vr41xx: add irq_set_freq() and irq_set_state() 2008-07-24 10:47:34 -07:00
s390 virtio: Add transport feature handling stub for virtio_ring. 2008-07-25 12:06:14 +10:00
sbus sparc64: fix up bus_id changes in sparc core code 2008-07-21 21:55:03 -07:00
scsi [SCSI] ch: fix ch_remove oops 2008-07-26 15:17:47 -04:00
serial cpm1: don't send break on TX_STOP, don't interrupt RX/TX when adjusting termios parameters 2008-07-24 10:47:30 -07:00
sh
sn
spi spi: au1550_spi: improve pio transfer mode 2008-07-24 10:47:30 -07:00
ssb
tc
telephony ixj: push BKL into driver and wrap ioctls 2008-07-25 10:53:43 -07:00
thermal
uio UIO: add generic UIO platform driver 2008-07-21 21:54:55 -07:00
usb Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
video Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight 2008-07-24 12:16:40 -07:00
virtio virtio: Add transport feature handling stub for virtio_ring. 2008-07-25 12:06:14 +10:00
w1 w1/ds2482: Convert to a new-style driver 2008-07-16 19:30:07 +02:00
watchdog remove the v850 port 2008-07-24 10:47:24 -07:00
xen sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
zorro move memory_read_from_buffer() from fs.h to string.h 2008-07-24 10:47:13 -07:00
Kconfig
Makefile gpiolib: allow user-selection 2008-07-25 10:53:30 -07:00