diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-10-09 00:23:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 12:07:02 +0300 |
commit | 7ef2b9748f88670252cc13f6d928d9c6bbfbc3ef (patch) | |
tree | 858b112cf1caaa0b704a3184443d645439bc0046 /net | |
parent | 3cda27a6e54027b1b50fbeda529e3cbc8099798d (diff) | |
download | linux-7ef2b9748f88670252cc13f6d928d9c6bbfbc3ef.tar.xz |
net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt
[ Upstream commit 13ba4c434422837d7c8c163f9c8d854e67bf3c99 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/can/j1939/transport.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index 28c2928e3931..916fdf2464bc 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -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)); |