[lvc-project] [PATCH v2] can: fix skb reference counting in j1939_session_new()
Marc Kleine-Budde
mkl at pengutronix.de
Fri Nov 29 16:05:11 MSK 2024
On 29.11.2024 13:59:28, Marc Kleine-Budde wrote:
> On 29.11.2024 13:55:56, Oleksij Rempel wrote:
> > On Tue, Nov 05, 2024 at 12:48:23PM +0300, Dmitry Antipov wrote:
> > > Since 'j1939_session_skb_queue()' do an extra 'skb_get()' for each
> > > new skb, I assume that the same should be done for an initial one
> > > in 'j1939_session_new()' just to avoid refcount underflow.
> > >
> > > Reported-by: syzbot+d4e8dc385d9258220c31 at syzkaller.appspotmail.com
> > > Closes: https://syzkaller.appspot.com/bug?extid=d4e8dc385d9258220c31
> > > Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
> > > Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
> >
> > Tested-by: Oleksij Rempel <o.rempel at pengutronix.de>
> > Acked-by: Oleksij Rempel <o.rempel at pengutronix.de>
>
> Can you re-phrase the commit message. The "assume" is not appropriate :)
What about:
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.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://linuxtesting.org/pipermail/lvc-project/attachments/20241129/e66d2ad8/attachment.pgp>
More information about the lvc-project
mailing list