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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:59:10 +0000 (23:59 +0900)
commit86da269c75676289aa3a0e4a72de6a7c76baf1b3
treebea36d10b8dde0cabcf3aa014fcb569bb3bdc57e
parentead049562758cc415437c0e99b09ce5eb2ab3dc0
can: j1939: transport: j1939_session_skb_drop_old(): spin_unlock_irqrestore() before kfree_skb()

commit c3c06c61890da80494bb196f75d89b791adda87f upstream.

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: 9d71dd0c7009 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/can/j1939/transport.c