Reinette Chatre
fbc9f97bbf
iwlwifi: do not cancel delayed work inside spin_lock_irqsave
...
Calling cancel_delayed_work() from inside
spin_lock_irqsave, introduces a potential deadlock.
As explained by Johannes Berg <johannes@sipsolutions.net>
A - lock
T - timer
phase CPU 1 CPU 2
---------------------------------------------
some place that calls
cancel_timer_sync()
(which is the | code)
lock-irq(A)
| "lock-irq"(T)
| "unlock"(T)
| wait(T)
unlock(A)
timer softirq
"lock"(T)
run(T)
"unlock"(T)
irq handler
lock(A)
unlock(A)
Now all that again, interleaved, leading to deadlock:
lock-irq(A)
"lock"(T)
run(T)
IRQ during or maybe
before run(T) --> lock(A)
"lock-irq"(T)
wait(T)
We fix this by moving the call to cancel_delayed_work() into workqueue.
There are cases where the work may not actually be queued or running
at the time we are trying to cancel it, but cancel_delayed_work() is
able to deal with this.
Also cleanup iwl_set_mode related to this call. This function
(iwl_set_mode) is only called when bringing interface up and there will
thus not be any scanning done. No need to try to cancel scanning.
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13224 , which was also
reported at http://marc.info/?l=linux-wireless&m=124081921903223&w=2 .
Tested-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-20 14:29:53 -04:00
..
accessibility
acpi
Merge branches 'release', 'bugzilla-13032', 'bugzilla-13041+', 'bugzilla-13121', 'bugzilla-13165', 'bugzilla-13243', 'bugzilla-13259', 'resume-sci-en-regression', 'thermal-regression', 'tsc-regression' and 'asus-2.6.30' into release
2009-05-16 01:55:59 -04:00
amba
ata
libata: Media rotation rate and form factor heuristics
2009-05-15 14:14:56 -04:00
atm
auxdisplay
base
Revert driver core: move platform_data into platform_device
2009-05-08 19:22:21 -07:00
block
hd: fix locking
2009-04-28 20:24:20 +02:00
bluetooth
cdrom
char
sysrq, intel_fb: fix sysrq g collision
2009-05-15 07:56:24 -05:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma
dma: fix ipu_idmac.c to not discard the last queued buffer
2009-05-12 14:41:48 -07:00
edac
eisa
firewire
firmware
ibft: fix the display of a few fields in the NIC attribute structure in sysfs
2009-05-02 15:36:10 -07:00
gpio
gpu
Merge branches 'release', 'bugzilla-13032', 'bugzilla-13041+', 'bugzilla-13121', 'bugzilla-13165', 'bugzilla-13243', 'bugzilla-13259', 'resume-sci-en-regression', 'thermal-regression', 'tsc-regression' and 'asus-2.6.30' into release
2009-05-16 01:55:59 -04:00
hid
HID: add NOGET quirk for devices from CH Products
2009-05-11 17:09:21 +02:00
hwmon
hwmon: (w83781d) Fix W83782D support (NULL pointer dereference)
2009-05-08 20:27:28 +02:00
i2c
Merge branch 'i2c-for-2630-rc5' of git://aeryn.fluff.org.uk/bjdooks/linux
2009-05-12 11:21:51 -07:00
ide
piix: The Sony TZ90 needs the cable type hardcoding
2009-05-16 19:03:36 +02:00
idle
ieee1394
infiniband
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
2009-05-13 16:31:12 -07:00
input
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
2009-05-12 11:21:24 -07:00
isdn
Fix the race between capifs remount and node creation
2009-05-09 10:51:34 -04:00
leds
lguest
macintosh
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
2009-04-24 08:16:05 -07:00
mca
md
md: remove rd%d links immediately after stopping an array.
2009-05-07 12:51:06 +10:00
media
V4L/DVB (11680): cafe_ccic: use = instead of == for setting a value at a var
2009-05-09 18:54:32 -03:00
memstick
message
mfd
misc
isl29003: fix resume functionality
2009-05-06 16:36:10 -07:00
mmc
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
2009-05-05 08:23:16 -07:00
mtd
Convert obvious places to deactivate_locked_super()
2009-05-09 10:49:40 -04:00
net
iwlwifi: do not cancel delayed work inside spin_lock_irqsave
2009-05-20 14:29:53 -04:00
nubus
of
oprofile
parisc
parport
pci
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
2009-05-15 16:47:55 -07:00
pcmcia
[ARM] 5458/1: pcmcia: pxa2xx-sharpsl: check if we do have Scoop config
2009-04-23 23:25:40 +01:00
platform
eeepc-laptop: unregister_rfkill_notifier on failure
2009-05-14 11:28:27 -04:00
pnp
ACPI: suspend: don't let device _PS3 failure prevent suspend
2009-05-08 00:22:29 -04:00
power
ps3
rapidio
regulator
regulator: Fix default constraints for fixed voltage regulators
2009-04-28 18:58:08 +01:00
rtc
rtc: rtc-twl4030 don't mask alarm interrupts on suspend
2009-05-12 14:11:35 -07:00
s390
[SCSI] zfcp: Fix oops when port disappears
2009-04-27 10:07:37 -05:00
sbus
scsi
Reduce path_lookup() abuses
2009-05-09 10:49:42 -04:00
serial
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
2009-05-15 08:05:02 -07:00
sh
sn
spi
pxa2xx_spi: prevent panic case setup() fails
2009-05-12 14:11:34 -07:00
ssb
staging
Staging: comedi: David doesn't want to get comedi patches
2009-05-08 19:39:28 -07:00
tc
telephony
thermal
thermal: fix off-by-1 error in trip point trigger condition
2009-05-14 13:40:53 -04:00
uio
usb
usb-serial: ftdi_sio: fix reference counting of ftdi_private
2009-05-08 19:34:57 -07:00
uwb
video
MIPS: gbe: Make needlessly global symbols static in drivers/video/gbefb.c
2009-05-14 13:50:25 +01:00
virtio
w1
watchdog
[ARM] 5460/1: Orion: reduce namespace pollution
2009-04-23 23:25:41 +01:00
xen
[IA64] xen_domu_defconfig: fix build issues/warnings
2009-05-05 11:43:13 -07:00
zorro
Kconfig
Makefile
V4L/DVB (11561a): move media after i2c
2009-04-29 15:41:13 -03:00