Commit a8c69500 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Marc Kleine-Budde
Browse files

can: j1939: j1939_session_new(): fix skb reference counting



Since j1939_session_skb_queue() does an extra skb_get() for each new
skb, do the same for the initial one in j1939_session_new() to avoid
refcount underflow.

Reported-by: default avatar <syzbot+d4e8dc385d9258220c31@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=d4e8dc385d9258220c31


Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Tested-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Acked-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20241105094823.2403806-1-dmantipov@yandex.ru


[mkl: clean up commit message]
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 30447a1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment