aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorJohn Fastabend <[email protected]>2018-02-05 18:17:49 +0000
committerDaniel Borkmann <[email protected]>2018-02-06 10:39:32 +0000
commit1aa12bdf1bfb95db7e75bfecf0e39a65f4e8fbf8 (patch)
treeea5a01abe7ce73c70b2ca5433463b4cd45f4e8f7 /scripts/gcc-plugins/randomize_layout_plugin.c
parentnet: add a UID to use for ULP socket assignment (diff)
downloadkernel-1aa12bdf1bfb95db7e75bfecf0e39a65f4e8fbf8.tar.gz
kernel-1aa12bdf1bfb95db7e75bfecf0e39a65f4e8fbf8.zip
bpf: sockmap, add sock close() hook to remove socks
The selftests test_maps program was leaving dangling BPF sockmap programs around because not all psock elements were removed from the map. The elements in turn hold a reference on the BPF program they are attached to causing BPF programs to stay open even after test_maps has completed. The original intent was that sk_state_change() would be called when TCP socks went through TCP_CLOSE state. However, because socks may be in SOCK_DEAD state or the sock may be a listening socket the event is not always triggered. To resolve this use the ULP infrastructure and register our own proto close() handler. This fixes the above case. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Reported-by: Prashant Bhole <[email protected]> Signed-off-by: John Fastabend <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions