https://github.com/torvalds/linux
Revision a8893fb3e61473349b052794ae157b938e3b2b98 authored by Akira Takeuchi on 10 December 2008, 12:43:24 UTC, committed by Linus Torvalds on 10 December 2008, 21:34:33 UTC
Discard low-prioriy Tx interrupts when closing an MN10300 on-chip serial port.

The MN10300 on-chip serial port uses three interrupts to manage its serial
ports:

 (1) A very high priority interrupt that drives virtual DMA for Rx.

 (2) A very high priority interrupt that drives virtual DMA for Tx.

 (3) A normal priority virtual interrupt that does the normal UART interrupt
     stuff and is shared between Rx and Tx.

mn10300_serial_stop_tx() only disables the high priority Tx interrupt.  It
doesn't also disable the normal priority one because it is shared with Rx.

However, the high priority interrupt may interrupt local_irq_disabled()
sections, and so may have queued up a low priority virtual interrupt whilst the
UART driver is asking for the Tx interrupt to be disabled.

The result of this can be an oops when we try to process the interrupt in
mn10300_serial_transmit_interrupt() as port->uart.info and port->uart.info->tty
may have gone away.

To deal with this, if either of those pointers is NULL, we make sure the
high-priority Tx interrupt is disabled and discard the interrupt.  The low
priority interrupt is disabled by the mn10300_serial_pic irq_chip table.

Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cb32898
History
Tip revision: a8893fb3e61473349b052794ae157b938e3b2b98 authored by Akira Takeuchi on 10 December 2008, 12:43:24 UTC
MN10300: Discard low-priority Tx interrupts when closing an on-chip serial port
Tip revision: a8893fb
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 867 bytes
.mailmap -rw-r--r-- 3.8 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.0 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 103.5 KB
Makefile -rw-r--r-- 55.9 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top