]> git.baikalelectronics.ru Git - kernel.git/commit
tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 13 Oct 2018 00:45:56 +0000 (02:45 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 Oct 2018 19:23:19 +0000 (12:23 -0700)
commit53e9ee5363244070594447598ea238c246180b2b
tree3fb306de5696a8c855340ce1ca9492a76702529d
parentce5e79cc3fde6f4ec88eae135612e94b1d1d84d3
tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup

Whenever the ULP data on the socket is mangled, enforce that the
caller has the socket lock held as otherwise things may race with
initialization and cleanup callbacks from ulp ops as both would
mangle internal socket state.

Joint work with John.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/ipv4/tcp_ulp.c