Star64_linux/include
John Fastabend 1aa12bdf1b 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: 174a79ff95 ("bpf: sockmap with sk redirect support")
Reported-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-02-06 11:39:32 +01:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings This is the bulk of pin control changes for the v4.16 kernel cycle: 2018-02-02 14:22:53 -08:00
keys
kvm
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2018-02-04 16:46:58 -05:00
math-emu
media
memory
misc powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
net bpf: sockmap, add sock close() hook to remove socks 2018-02-06 11:39:32 +01:00
pcmcia
ras
rdma
scsi SCSI postmerge on 20180202 2018-02-03 13:07:56 -08:00
soc
sound
target
trace
uapi Merge branch 'i2c/for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-02-04 10:57:43 -08:00
video
xen