remarkable-linux/drivers
Chandra Seetharaman 7253a33434 dm mpath: add missing path switching locking
Moving the path activation to workqueue along with scsi_dh patches introduced
a race. It is due to the fact that the current_pgpath (in the multipath data
structure) can be modified if changes happen in any of the paths leading to
the lun. If the changes lead to current_pgpath being set to NULL, then it
leads to the invalid access which results in the panic below.

This patch fixes that by storing the pgpath to activate in the multipath data
structure and properly protecting it.

Note that if activate_path is called twice in succession with different pgpath,
with the second one being called before the first one is done, then activate
path will be called twice for the second pgpath, which is fine.

Unable to handle kernel paging request for data at address 0x00000020
Faulting instruction address: 0xd000000000aa1844
cpu 0x1: Vector: 300 (Data Access) at [c00000006b987a80]
    pc: d000000000aa1844: .activate_path+0x30/0x218 [dm_multipath]
    lr: c000000000087a2c: .run_workqueue+0x114/0x204
    sp: c00000006b987d00
   msr: 8000000000009032
   dar: 20
 dsisr: 40000000
  current = 0xc0000000676bb3f0
  paca    = 0xc0000000006f3680
    pid   = 2528, comm = kmpath_handlerd
enter ? for help
[c00000006b987da0] c000000000087a2c .run_workqueue+0x114/0x204
[c00000006b987e40] c000000000088b58 .worker_thread+0x120/0x144
[c00000006b987f00] c00000000008ca70 .kthread+0x78/0xc4
[c00000006b987f90] c000000000027cc8 .kernel_thread+0x4c/0x68

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-10-01 14:39:27 +01:00
..
accessibility
acpi Merge branches 'smbus' and 'fujitsu-fix' into release-2.6.27 2008-09-04 14:33:03 +02:00
amba
ata sata_nv: reinstate nv_hardreset() for non generic controllers 2008-09-29 00:14:34 -04:00
atm
auxdisplay
base
block Revert "pktcdvd: push BKL down into driver" 2008-08-27 13:42:00 -07:00
bluetooth [Bluetooth] Fix USB disconnect handling of btusb driver 2008-09-23 00:16:36 +02:00
cdrom
char kgdboc,tty: Fix tty polling search to use name correctly 2008-09-26 10:36:42 -05:00
clocksource clocksource, acpi_pm.c: fix check for monotonicity 2008-09-11 11:14:29 +02:00
connector
cpufreq
cpuidle
crypto crypto: talitos - Avoid consecutive packets going out with same IV 2008-09-14 13:41:19 -07:00
dca
dio
dma
edac
eisa
firewire
firmware ibft: fix target info parsing in ibft module 2008-09-02 19:21:40 -07:00
gpio
gpu drm/radeon: downgrade debug message from info to debug. 2008-09-01 08:51:52 +10:00
hid
hwmon hwmon: (ad7414) Make ad7414_update_device() static 2008-09-20 10:25:20 +02:00
i2c i2c-dev: Return correct error code on class_create() failure 2008-09-24 13:39:21 +02:00
ide ide: note that IDE generic may prevent other drivers from attaching 2008-09-27 19:32:17 +02:00
ieee1394
infiniband IPoIB: Fix crash when path record fails after path flush 2008-09-25 16:37:03 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-09-22 07:46:06 -07:00
isdn
leds
lguest
macintosh
mca
md dm mpath: add missing path switching locking 2008-10-01 14:39:27 +01:00
media VIDEO_SH_MOBILE_CEU should depend on HAS_DMA 2008-09-10 14:15:29 -07:00
memstick memstick: fix MSProHG 8-bit interface mode support 2008-09-13 14:41:52 -07:00
message
mfd mfd: Fix asic3 compilation 2008-09-30 09:57:22 +02:00
misc ia64: fix panic during `modprobe -r xpc' 2008-09-13 14:41:52 -07:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2008-09-21 12:38:45 -07:00
mtd [MTD] [NAND] tmio_nand: fix base address programming 2008-09-05 15:34:35 +01:00
net ath9k: disable MIB interrupts to fix interrupt storm 2008-09-24 15:55:24 -04:00
nubus
of
oprofile
parisc
parport
pci PCI: fix compiler warnings in pci_get_subsys() 2008-09-16 15:52:08 -07:00
pcmcia pcmcia: Fix broken abuse of dev->driver_data 2008-09-22 08:42:50 -07:00
pnp
power
ps3
rapidio
regulator
rtc rtc-cmos: wake again from S5 2008-09-02 19:21:40 -07:00
s390 [S390] cio: fix orb initialization in cio_start_key 2008-09-16 09:34:32 -07:00
sbus
scsi scsi: fix fall out of sg-chaining patch in qlogicpti 2008-09-29 09:41:56 +02:00
serial atmel_serial: update the powersave handler to match serial core 2008-09-23 08:09:14 -07:00
sh
sn
spi spi_s3c24xx: fix section warning 2008-09-13 14:41:52 -07:00
ssb [SSB] Initialise dma_mask for SSB_BUSTYPE_SSB devices 2008-09-27 15:45:37 +01:00
tc
telephony
thermal
uio
usb USB: revert recovery from transient errors 2008-09-23 13:58:10 -07:00
video atmel_lcdfb: disable LCD and DMA engines when suspending 2008-09-13 14:41:52 -07:00
virtio
w1
watchdog ibmasr: remove unnecessary spin_unlock() 2008-09-23 08:09:13 -07:00
xen xen: fix 2.6.27-rc5 xen balloon driver warnings 2008-09-08 20:21:15 +02:00
zorro
Kconfig
Makefile