From: Craig Gallek Date: Tue, 5 Jan 2016 15:57:13 +0000 (-0500) Subject: soreuseport: change consume_skb to kfree_skb in error case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00ce3a15d811978fcb204a1a3f5f8c059096fa5e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git soreuseport: change consume_skb to kfree_skb in error case Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF") Suggested-by: Daniel Borkmann Signed-off-by: Craig Gallek Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- diff --git a/net/core/sock_reuseport.c b/net/core/sock_reuseport.c index ae0969c0fc2e..1df98c557440 100644 --- a/net/core/sock_reuseport.c +++ b/net/core/sock_reuseport.c @@ -173,7 +173,7 @@ static struct sock *run_bpf(struct sock_reuseport *reuse, u16 socks, /* temporarily advance data past protocol header */ if (!pskb_pull(skb, hdr_len)) { - consume_skb(nskb); + kfree_skb(nskb); return NULL; } index = bpf_prog_run_save_cb(prog, skb);