diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-20 23:30:19 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-20 23:30:19 +0900 |
commit | bc9b3f5c9f3702e71066a4de0afe509a201d98b4 (patch) | |
tree | 5e3f500793d6f73924e9b178e84f5a27e63a0476 /drivers/serial/sh-sci.c | |
parent | 94c8b6dbd64c51aa7ce7fcc466beccf942271b0e (diff) | |
download | lwn-bc9b3f5c9f3702e71066a4de0afe509a201d98b4.tar.gz lwn-bc9b3f5c9f3702e71066a4de0afe509a201d98b4.zip |
serial: sh-sci: Fix up break timer scheduling race.
The break flag timer is presently added through add_timer() via the
interrupt and error paths, where it is possible to send multiple breaks
in rapid succession and trigger the timer pending BUG_ON(). This moves
over to a mod_timer() instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r-- | drivers/serial/sh-sci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 83bf1b8d7744..999fe5f5d938 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -554,8 +554,7 @@ static void sci_receive_chars(struct uart_port *port) */ static inline void sci_schedule_break_timer(struct sci_port *port) { - port->break_timer.expires = jiffies + SCI_BREAK_JIFFIES; - add_timer(&port->break_timer); + mod_timer(&port->break_timer, jiffies + SCI_BREAK_JIFFIES); } /* Ensure that two consecutive samples find the break over. */ |