summaryrefslogtreecommitdiff
path: root/net/mptcp/crypto_test.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-08-05 03:21:25 +0300
committerDavid S. Miller <davem@davemloft.net>2022-08-05 10:51:28 +0300
commitc0bf3c6aa444a5ef44acc57ef6cfa53fd4fc1c9b (patch)
treee17e53860c401852e80eb815ed850436d4c7ea96 /net/mptcp/crypto_test.c
parent4ae97cae07e15d41e5c0ebabba64c6eefdeb0bbe (diff)
downloadlinux-c0bf3c6aa444a5ef44acc57ef6cfa53fd4fc1c9b.tar.xz
mptcp: move subflow cleanup in mptcp_destroy_common()
If the mptcp socket creation fails due to a CGROUP_INET_SOCK_CREATE eBPF program, the MPTCP protocol ends-up leaking all the subflows: the related cleanup happens in __mptcp_destroy_sock() that is not invoked in such code path. Address the issue moving the subflow sockets cleanup in the mptcp_destroy_common() helper, which is invoked in every msk cleanup path. Additionally get rid of the intermediate list_splice_init step, which is an unneeded relic from the past. The issue is present since before the reported root cause commit, but any attempt to backport the fix before that hash will require a complete rewrite. Fixes: e16163b6e2 ("mptcp: refactor shutdown and close") Reported-by: Nguyen Dinh Phi <phind.uet@gmail.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Co-developed-by: Nguyen Dinh Phi <phind.uet@gmail.com> Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/crypto_test.c')
0 files changed, 0 insertions, 0 deletions