aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2013-05-24 11:26:48 +0530
committerTushar Behera <tushar.behera@linaro.org>2013-05-24 12:11:16 +0530
commitecbdbf48a0f9f8e6e7d8d771b5333db3e029e207 (patch)
tree3bdace40a345067f715e1c2e9c31e9c141069d0e
parentb72e308dc178567171c2fca52ec22d52a0cfc972 (diff)
serial: samsung: Fix issue when CONFIG_PREEMPT_RT_FULL is enabledsamsung-lt-lng-v3.8.13-2
As described in the call graph below, uart_start is called from tty_flip_buffer_push if CONFIG_PREEMPT_RT_FULL is defined. tty_flip_buffer_push -> flush_to_ldisc -> n_tty_receive_buf -> uart_flush_chars -> uart_start uart_start() tries to acquire port->lock. So to be safe we should not be calling tty_flip_buffer_push while holding port->lock. Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
-rw-r--r--drivers/tty/serial/samsung.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 39cf0015b7fb..1f5f8793945a 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -299,7 +299,9 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
ignore_char:
continue;
}
+ spin_unlock_irqrestore(&port->lock, flags);
tty_flip_buffer_push(tty);
+ return IRQ_HANDLED;
out:
spin_unlock_irqrestore(&port->lock, flags);