To detect skb refcounting issues ASAP. skb_share() will return true, if number of users (i.e. refcounting) is not equal 1. Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- net/can/j1939/transport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index ac5ecbd8606d..18f3399592ec 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -125,6 +125,7 @@ static void j1939_session_destroy(struct j1939_session *session) j1939_session_list_lock(session->priv); j1939_session_list_del(session); j1939_session_list_unlock(session->priv); + WARN_ON_ONCE(skb_shared(session->skb)); kfree_skb(session->skb); j1939_priv_put(session->priv); kfree(session); -- 2.19.1