Skip to content

Commit

Permalink
net: j1939: j1939_session_fresh_new(): fix missing initialization of …
Browse files Browse the repository at this point in the history
…skbcnt

[ Upstream commit 13ba4c4 ]

This patch add the initialization of skbcnt, similar to:

    e009f95 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: 9d71dd0 ("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>
  • Loading branch information
marckleinebudde authored and gregkh committed Oct 29, 2020
1 parent 52d96d2 commit d7c3299
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/can/j1939/transport.c
Expand Up @@ -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));

Expand Down

0 comments on commit d7c3299

Please sign in to comment.