diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-11-05 17:52:35 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-07 13:45:34 -0800 |
commit | 55d42a0c3f9ccd07c199e0ddbe1ba87572d30074 (patch) | |
tree | e3a79d6a0736b161b4406e4d1f829f67b29d3910 /net/ipv6/tcp_ipv6.c | |
parent | 1904fb9ebf911441f90a68e96b22aa73e4410505 (diff) | |
download | linux-55d42a0c3f9ccd07c199e0ddbe1ba87572d30074.tar.gz linux-55d42a0c3f9ccd07c199e0ddbe1ba87572d30074.tar.bz2 linux-55d42a0c3f9ccd07c199e0ddbe1ba87572d30074.zip |
selftests: net: add a test for closing a netlink socket ith dump in progress
Close a socket with dump in progress. We need a dump which generates
enough info not to fit into a single skb. Policy dump fits the bill.
Use the trick discovered by syzbot for keeping a ref on the socket
longer than just close, with mqueue.
TAP version 13
1..3
# Starting 3 tests from 1 test cases.
# RUN global.test_sanity ...
# OK global.test_sanity
ok 1 global.test_sanity
# RUN global.close_in_progress ...
# OK global.close_in_progress
ok 2 global.close_in_progress
# RUN global.close_with_ref ...
# OK global.close_with_ref
ok 3 global.close_with_ref
# PASSED: 3 / 3 tests passed.
# Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
Note that this test is not expected to fail but rather crash
the kernel if we get the cleanup wrong.
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20241106015235.2458807-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
0 files changed, 0 insertions, 0 deletions