mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 16:44:10 +08:00
serial: sh-sci: Fix crash in rx_timer_fn() on PIO fallback
When falling back to PIO, active_rx must be set to a different value than cookie_rx[i], else sci_dma_rx_find_active() will incorrectly find a match, leading to a NULL pointer dereference in rx_timer_fn() later. Use zero instead, which is the same value as after driver initialization. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dd1f2250da
commit
2e948218b7
@ -1369,7 +1369,7 @@ fail:
|
||||
dmaengine_terminate_async(chan);
|
||||
for (i = 0; i < 2; i++)
|
||||
s->cookie_rx[i] = -EINVAL;
|
||||
s->active_rx = -EINVAL;
|
||||
s->active_rx = 0;
|
||||
s->chan_rx = NULL;
|
||||
sci_start_rx(port);
|
||||
if (!port_lock_held)
|
||||
|
Loading…
Reference in New Issue
Block a user