]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
authorMartin KaFai Lau <kafai@fb.com>
Fri, 31 May 2019 22:29:13 +0000 (15:29 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 3 Jun 2019 20:38:48 +0000 (13:38 -0700)
commit778ce3c7167f9d887ed4c751065b3bac6bff4bed
tree294de439bd74c0d6b281b47e61ed2e164b6fab1c
parent9ccbce380cf6e14b7ef4db28b4730f9b0120d096
bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro

When the commit 6d1f88121fcc ("udp: Add GRO functions to UDP socket")
added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
the reuseport_select_sock() assumption that skb->data is pointing
to the transport header.

This patch follows an earlier __udp6_lib_err() fix by
passing a NULL skb to avoid calling the reuseport's bpf_prog.

Fixes: 6d1f88121fcc ("udp: Add GRO functions to UDP socket")
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/ipv4/udp.c
net/ipv6/udp.c