diff options
author | Jakub Sitnicki <jakub@cloudflare.com> | 2020-02-06 12:16:52 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-02-07 22:36:26 +0100 |
commit | 5d3919a953c3c96c02fc7a337f8376cde43ae31f (patch) | |
tree | 9bd584a0bf1c7a7ea0ccd05c4f644f622b1670bd /net/core | |
parent | 0b2dc83906cf1e694e48003eae5df8fa63f76fd9 (diff) |
selftests/bpf: Test freeing sockmap/sockhash with a socket in it
Commit 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear
down") introduced sleeping issues inside RCU critical sections and while
holding a spinlock on sockmap/sockhash tear-down. There has to be at least
one socket in the map for the problem to surface.
This adds a test that triggers the warnings for broken locking rules. Not a
fix per se, but rather tooling to verify the accompanying fixes. Run on a
VM with 1 vCPU to reproduce the warnings.
Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down")
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200206111652.694507-4-jakub@cloudflare.com
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions