diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 9367f260afeb..60ca33ffb181 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -1018,6 +1018,7 @@ static void caif_sock_destructor(struct sock *sk) return; } sk_stream_kill_queues(&cf_sk->sk); + WARN_ON(sk->sk_forward_alloc); caif_free_client(&cf_sk->layer); } diff --git a/net/core/stream.c b/net/core/stream.c index 6f5979c6f2b0..04cee992af11 100644 --- a/net/core/stream.c +++ b/net/core/stream.c @@ -206,7 +206,6 @@ void sk_stream_kill_queues(struct sock *sk) sk_mem_reclaim(sk); WARN_ON(sk->sk_wmem_queued); - WARN_ON(sk->sk_forward_alloc); /* It is _impossible_ for the backlog to contain anything * when we get here. All user references to this socket