can: flexcan: fix an use-after-free in flexcan_setup_stop_mode()
authorWen Yang <wen.yang99@zte.com.cn>
Sat, 6 Jul 2019 03:37:20 +0000 (11:37 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Jul 2019 09:16:31 +0000 (11:16 +0200)
commite9f2a856e102fa27715b94bcc2240f686536d29b
tree1ac693a180db2f4e5552143ea72a76ce3ab01d11
parent375f755899b8fc21196197e02aab26257df26e85
can: flexcan: fix an use-after-free in flexcan_setup_stop_mode()

The gpr_np variable is still being used in dev_dbg() after the
of_node_put() call, which may result in use-after-free.

Fixes: de3578c198c6 ("can: flexcan: add self wakeup support")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: linux-stable <stable@vger.kernel.org> # >= v5.0
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c