j1939_session_skb_find() may return NULL. Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- net/can/j1939/transport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index 9872082254c4..cda1db7a46a1 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -1703,6 +1703,12 @@ static void j1939_xtp_rx_dat_one(struct j1939_session *session, goto out_session_unlock; } se_skb = j1939_session_skb_find(session); + if (!se_skb) { + netdev_warn(priv->ndev, "%s: 0x%p: no skb found\n", __func__, + session); + goto out_session_unlock; + } + skcb = j1939_skb_to_cb(se_skb); offset = packet * 7 - skcb->offset; nbytes = se_skb->len - offset; -- 2.20.1