Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt

This patch add the initialization of skbcnt, similar to:

e009f95b1543 can: j1935: j1939_tp_tx_dat_new(): fix missing initialization of skbcnt

Let's play save and initialize this skbcnt as well.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

+1
+1
net/can/j1939/transport.c
··· 1488 1488 skb->dev = priv->ndev; 1489 1489 can_skb_reserve(skb); 1490 1490 can_skb_prv(skb)->ifindex = priv->ndev->ifindex; 1491 + can_skb_prv(skb)->skbcnt = 0; 1491 1492 skcb = j1939_skb_to_cb(skb); 1492 1493 memcpy(skcb, rel_skcb, sizeof(*skcb)); 1493 1494