Skip to content
Commit 99ba2b5a authored by John Fastabend's avatar John Fastabend Committed by Alexei Starovoitov
Browse files

bpf: sockhash, disallow bpf_tcp_close and update in parallel



After latest lock updates there is no longer anything preventing a
close and recvmsg call running in parallel. Additionally, we can
race update with close if we close a socket and simultaneously update
if via the BPF userspace API (note the cgroup ops are already run
with sock_lock held).

To resolve this take sock_lock in close and update paths.

Reported-by: default avatar <syzbot+b680e42077a0d7c9a0c4@syzkaller.appspotmail.com>
Fixes: e9db4ef6

 ("bpf: sockhash fix omitted bucket lock in sock_close")
Signed-off-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 0c6bc6e5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment