bpf: sk_msg, zap ingress queue on psock down
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 20 Dec 2018 19:35:34 +0000 (11:35 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 20 Dec 2018 22:47:09 +0000 (23:47 +0100)
commita136678c0bdbb650daff5df5eec1dab960e074a7
treed5bb32c153cfcadfbbecd612aea1bee8a6a5cd3f
parent552de91068828daef50a227a665068cf8dde835e
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: 604326b41a6f ("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>
net/core/skmsg.c