[PATCH] serial: samsung: disable irq before calling free_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kisang Lee <kisang80.lee@xxxxxxxxxxx>

Pending UART irq may trigger spurious handling and may lead to
softlockup. This patch will fix following softlockup.

Signed-off-by: Kisang Lee <kisang80.lee@xxxxxxxxxxx>
Signed-off-by: Huisung Kang <hs1218.kang@xxxxxxxxxxx>
---
 drivers/tty/serial/samsung.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index c55e5fb..9067299 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -425,15 +425,19 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
 	struct s3c24xx_uart_port *ourport = to_ourport(port);
 
 	if (ourport->tx_claimed) {
-		if (!s3c24xx_serial_has_interrupt_mask(port))
+		if (!s3c24xx_serial_has_interrupt_mask(port)) {
+			disable_irq(ourport->tx_irq);
 			free_irq(ourport->tx_irq, ourport);
+		}
 		tx_enabled(port) = 0;
 		ourport->tx_claimed = 0;
 	}
 
 	if (ourport->rx_claimed) {
-		if (!s3c24xx_serial_has_interrupt_mask(port))
+		if (!s3c24xx_serial_has_interrupt_mask(port)) {
+			disable_irq(ourport->rx_irq);
 			free_irq(ourport->rx_irq, ourport);
+		}
 		ourport->rx_claimed = 0;
 		rx_enabled(port) = 0;
 	}
-- 
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux