lkml.org 
[lkml]   [2020]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.9 024/757] net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt
    Date
    From: Marc Kleine-Budde <mkl@pengutronix.de>

    [ 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>
    ---
    net/can/j1939/transport.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/net/can/j1939/transport.c
    +++ b/net/can/j1939/transport.c
    @@ -1488,6 +1488,7 @@ j1939_session *j1939_session_fresh_new(s
    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));


    \
     
     \ /
      Last update: 2020-10-27 17:40    [W:4.814 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site