linux-stable/drivers
Anton Vorontsov 768aec0b5b serial: 8250: fix shared interrupts issues with SMP and RT kernels
With SMP kernels _irqsave spinlock disables only local interrupts, while
the shared serial interrupt could be assigned to the CPU that is not
currently starting up the serial port.

This might cause issues because serial8250_startup() routine issues
IRQ-triggering operations before registering the port in the IRQ chain
(though, this is fine to do and done explicitly because we don't want to
process any interrupts on the port startup).

With RT kernels and preemptable hardirqs, _irqsave spinlock does not
disable local hardirqs, and the bug could be reproduced much easily:

$ cat /dev/ttyS0 &
$ cat /dev/ttyS1
irq 42: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[C0475EB0] [C0008A98] show_stack+0x4c/0x1ac (unreliable)
[C0475EF0] [C004BBD4] __report_bad_irq+0x34/0xb8
[C0475F10] [C004BD38] note_interrupt+0xe0/0x308
[C0475F50] [C004B09C] thread_simple_irq+0xdc/0x104
[C0475F70] [C004B3FC] do_irqd+0x338/0x3c8
[C0475FC0] [C00398E0] kthread+0xf8/0x100
[C0475FF0] [C0011FE0] original_kernel_thread+0x44/0x60
handlers:
[<c02112c4>] (serial8250_interrupt+0x0/0x138)
Disabling IRQ #42

After this, all serial ports on the given IRQ are non-functional.

To fix the issue we should explicitly disable shared IRQ before
issuing any IRQ-triggering operations.

I also changed spin_lock_irqsave to the ordinary spin_lock, since it
seems to be safe: chain does not contain new port (yet), thus nobody
will interfere us from the ISRs.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-22 13:03:28 -07:00
..
accessibility
acpi APCI: revert another duplicated patch 2008-07-20 17:14:57 -07:00
amba
ata Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
atm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
auxdisplay
base Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
block m68k: Return -ENODEV if no device is found 2008-07-20 17:24:38 -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 Fix the epca driver to permit epca_setup() to be invoked from the kernel cmdline 2008-07-22 13:03:28 -07:00
clocksource Fix printk format warning in clocksource/acpi_pm.c 2008-07-15 11:01:39 -07:00
connector
cpufreq Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2008-07-21 15:10:37 -07:00
cpuidle
crypto crypto: ixp4xx - Select CRYPTO_AUTHENC 2008-07-13 20:12:11 +08:00
dca
dio dio: use dio_match_device() in dio_bus_match() 2008-07-20 17:24:40 -07:00
dma
edac
eisa
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 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2008-07-14 15:51:11 -07:00
gpio gpio: pcf857x: add lock and handle more chips 2008-07-22 09:59:41 -07:00
gpu drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
hid USB: fix usb_reset_device and usb_reset_composite_device(take 3) 2008-07-21 15:16:33 -07:00
hwmon Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
i2c i2c: Convert the max6875 driver to a new-style i2c driver 2008-07-16 19:30:07 +02:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6 2008-07-17 10:55:07 -07:00
ieee1394 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
infiniband Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
input Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
isdn tty: rework break handling 2008-07-22 13:03:28 -07:00
leds
lguest Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
macintosh Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-07-21 10:30:10 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2008-07-20 21:14:42 -07:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
mfd mfd: let asic3 use mem resource instead of bus_shift 2008-07-20 19:56:44 +02:00
misc fujitsu-laptop: depends on INPUT 2008-07-16 23:27:03 +02:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2008-07-16 15:17:52 -07:00
mtd [MIPS] MTX-1 flash partition setup move to platform devices registration 2008-07-15 18:44:38 +01:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-21 11:29:52 -07:00
nubus
of OpenFirmware: Include <linux/of_i2c.h> from of_i2c.c. 2008-07-12 12:10:52 -06:00
oprofile
parisc
parport
pci pci kernel-doc fatal error 2008-07-21 10:43:26 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6 2008-07-17 10:55:07 -07:00
pnp PNPACPI: add support for HP vendor-specific CCSR descriptors 2008-07-16 23:27:07 +02:00
power
ps3
rapidio
rtc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-07-14 16:06:58 -07:00
s390 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
sbus drivers/sbus/: cleanups 2008-07-17 21:38:17 -07:00
scsi scsi_dh: Verify "dev" is a sdev before accessing it. 2008-07-16 17:54:21 -07:00
serial serial: 8250: fix shared interrupts issues with SMP and RT kernels 2008-07-22 13:03:28 -07:00
sh
sn
spi Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
ssb
tc
telephony
thermal
uio Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
usb tty: rework break handling 2008-07-22 13:03:28 -07:00
video export c2p 2008-07-20 17:24:39 -07:00
virtio
w1 w1/ds2482: Convert to a new-style driver 2008-07-16 19:30:07 +02:00
watchdog Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
xen Merge branch 'x86/paravirt-spinlocks' into x86/for-linus 2008-07-21 16:45:56 +02:00
zorro zorro: use memory_read_from_buffer 2008-07-20 17:24:38 -07:00
Kconfig
Makefile gpu: re-order GPU subdirectory vs char for AGP vs DRM startup. 2008-07-21 08:42:49 +10:00