]> git.baikalelectronics.ru Git - kernel.git/commit
can: j1939: transport: j1939_session_skb_drop_old(): spin_unlock_irqrestore() before...
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 27 Oct 2022 09:12:37 +0000 (17:12 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 27 Oct 2022 11:34:23 +0000 (13:34 +0200)
commita7cc53ac46d168ef5a70c79b1a13999bd7e504eb
tree29022c2c017da17e2fd2687de6a5a0d124e8650b
parent9537003c41b3bd3e4b3d23e706c9de70ef66860b
can: j1939: transport: j1939_session_skb_drop_old(): spin_unlock_irqrestore() before kfree_skb()

It is not allowed to call kfree_skb() from hardware interrupt context
or with interrupts being disabled. The skb is unlinked from the queue,
so it can be freed after spin_unlock_irqrestore().

Fixes: 877b9bba3266 ("can: add support of SAE J1939 protocol")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/all/20221027091237.2290111-1-yangyingliang@huawei.com
Cc: stable@vger.kernel.org
[mkl: adjust subject]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/j1939/transport.c