Message ID | 20230615200019.276652-2-andrei.gherzan@canonical.com |
---|---|
State | New |
Headers | show |
Series | Fix WARN_ON in sk_stream_kill_queues | expand |
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index c44ade1b18335..43ecbd2bbe1fa 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -1022,6 +1022,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 448100f51bf4b..0b10c2cc56b33 100644 --- a/net/core/stream.c +++ b/net/core/stream.c @@ -209,7 +209,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