Skip to content

Commit a136678

Browse files
jrfastabborkmann
authored andcommitted
bpf: sk_msg, zap ingress queue on psock down
In addition to releasing any cork'ed data on a psock when the psock is removed we should also release any skb's in the ingress work queue. Otherwise the skb's eventually get free'd but late in the tear down process so we see the WARNING due to non-zero sk_forward_alloc. void sk_stream_kill_queues(struct sock *sk) { ... WARN_ON(sk->sk_forward_alloc); ... } Fixes: 604326b ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 552de91 commit a136678

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/skmsg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ void sk_psock_drop(struct sock *sk, struct sk_psock *psock)
572572
{
573573
rcu_assign_sk_user_data(sk, NULL);
574574
sk_psock_cork_free(psock);
575+
sk_psock_zap_ingress(psock);
575576
sk_psock_restore_proto(sk, psock);
576577

577578
write_lock_bh(&sk->sk_callback_lock);

0 commit comments

Comments
 (0)