]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
serial: sh-sci: Fix crash in rx_timer_fn() on PIO fallback
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 13 Dec 2018 18:44:42 +0000 (19:44 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:53 +0000 (14:21 -0300)
commitd323ae468ef4eabf40de813b2156ace50c0b0ee7
tree45e1cd3eff2a457b7d2787fcbaf478ceddd046ba
parent82e8777ba17f9aba862e9d5cb16233fda23712d4
serial: sh-sci: Fix crash in rx_timer_fn() on PIO fallback

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit 2e948218b7c1262a3830823d6620eb227e3d4e3a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/tty/serial/sh-sci.c