Skip to content

Commit 00ce3a1

Browse files
kraigatgoogdavem330
authored andcommitted
soreuseport: change consume_skb to kfree_skb in error case
Fixes: 538950a ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF") Suggested-by: Daniel Borkmann <[email protected]> Signed-off-by: Craig Gallek <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1134158 commit 00ce3a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/sock_reuseport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static struct sock *run_bpf(struct sock_reuseport *reuse, u16 socks,
173173

174174
/* temporarily advance data past protocol header */
175175
if (!pskb_pull(skb, hdr_len)) {
176-
consume_skb(nskb);
176+
kfree_skb(nskb);
177177
return NULL;
178178
}
179179
index = bpf_prog_run_save_cb(prog, skb);

0 commit comments

Comments
 (0)