提交 c5a9262f 编写于 作者: G Geert Uytterhoeven 提交者: Greg Kroah-Hartman

serial: sh-sci: Stop RX FIFO timer during port shutdown

The RX FIFO timer may be armed when the port is shut down, hence the
timer function may still be called afterwards.

Fix this race condition by deleting the timer during port shutdown.

Fixes: 03940376 ("serial: sh-sci: SCIFA/B RX FIFO software timeout")
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: NSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 16ecf49c
...@@ -2099,6 +2099,8 @@ static void sci_shutdown(struct uart_port *port) ...@@ -2099,6 +2099,8 @@ static void sci_shutdown(struct uart_port *port)
} }
#endif #endif
if (s->rx_trigger > 1 && s->rx_fifo_timeout > 0)
del_timer_sync(&s->rx_fifo_timer);
sci_free_irq(s); sci_free_irq(s);
sci_free_dma(port); sci_free_dma(port);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册