aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2022-09-01 17:28:59 -0700
committerAlexei Starovoitov <ast@kernel.org>2022-09-02 20:34:31 -0700
commit0f95f7d42611882a9a6250923dd493951a94961a (patch)
tree87ad154a47de0da60b316aa34660459fe0a3a0e2 /drivers/net/dsa
parentbpf: net: Change do_ipv6_getsockopt() to take the sockptr_t argument (diff)
downloadlinux-dev-0f95f7d42611882a9a6250923dd493951a94961a.tar.xz
linux-dev-0f95f7d42611882a9a6250923dd493951a94961a.zip
bpf: net: Avoid do_ipv6_getsockopt() taking sk lock when called from bpf
Similar to the earlier patch that changes sk_getsockopt() to use sockopt_{lock,release}_sock() such that it can avoid taking the lock when called from bpf. This patch also changes do_ipv6_getsockopt() to use sockopt_{lock,release}_sock() such that bpf_getsockopt(SOL_IPV6) can reuse do_ipv6_getsockopt(). Although bpf_getsockopt(SOL_IPV6) currently does not support optname that requires lock_sock(), using sockopt_{lock,release}_sock() consistently across *_getsockopt() will make future optname addition harder to miss the sockopt_{lock,release}_sock() usage. eg. when adding new optname that requires a lock and the new optname is needed in bpf_getsockopt() also. Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20220902002859.2893064-1-kafai@fb.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/net/dsa')
0 files changed, 0 insertions, 0 deletions