linux-stable/arch/mn10300
Akira Takeuchi a8893fb3e6 MN10300: Discard low-priority Tx interrupts when closing an on-chip serial port
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>
2008-12-10 13:34:33 -08:00
..
boot inflate: refactor inflate malloc code 2008-07-25 10:53:28 -07:00
configs MN10300: Update asb2303_defconfig 2008-02-19 15:51:36 -08:00
kernel MN10300: Discard low-priority Tx interrupts when closing an on-chip serial port 2008-12-10 13:34:33 -08:00
lib mn10300: provide __ucmpdi2() for MN10300 2008-07-04 10:40:07 -07:00
mm MN10300: Don't do misalignment handling for userspace 2008-11-12 10:41:18 -08:00
oprofile mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
proc-mn103e010 mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
unit-asb2303 MN10300: Fix IRQ handling 2008-10-01 09:40:43 -07:00
unit-asb2305 MN10300: Fix IRQ handling 2008-10-01 09:40:43 -07:00
Kconfig container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
Kconfig.debug MN10300: Add built-in testing for misalignment handler 2008-11-12 10:41:17 -08:00
Makefile mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00