1
0
Fork 0

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

[ Upstream commit 13ba4c4344 ]

This patch add the initialization of skbcnt, similar to:

    e009f95b15 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: 9d71dd0c70 ("can: add support of SAE J1939 protocol")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Marc Kleine-Budde 2020-10-08 23:23:10 +02:00 committed by Greg Kroah-Hartman
parent 25bd9ea1ae
commit 46a55a44cc
1 changed files with 1 additions and 0 deletions

View File

@ -1488,6 +1488,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
skb->dev = priv->ndev;
can_skb_reserve(skb);
can_skb_prv(skb)->ifindex = priv->ndev->ifindex;
can_skb_prv(skb)->skbcnt = 0;
skcb = j1939_skb_to_cb(skb);
memcpy(skcb, rel_skcb, sizeof(*skcb));