Skip to content
Commit db9c9086 authored by Martin KaFai Lau's avatar Martin KaFai Lau Committed by Greg Kroah-Hartman
Browse files

bpf: tcp: Use sock_gen_put instead of sock_put in bpf_iter_tcp



[ Upstream commit 580031ff ]

While reviewing the udp-iter batching patches, noticed the bpf_iter_tcp
calling sock_put() is incorrect. It should call sock_gen_put instead
because bpf_iter_tcp is iterating the ehash table which has the req sk
and tw sk. This patch replaces all sock_put with sock_gen_put in the
bpf_iter_tcp codepath.

Fixes: 04c7820b ("bpf: tcp: Bpf iter batching and lock_sock")
Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230328004232.2134233-1-martin.lau@linux.dev


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 02eabb63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment