mptcp: fix race in release_cb
authorPaolo Abeni <pabeni@redhat.com>
Thu, 4 Mar 2021 21:32:14 +0000 (13:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Mar 2021 22:30:13 +0000 (14:30 -0800)
commitc2e6048fa1cf2228063aec299f93ac6eb256b457
treeb77344d33e9df2279a158bf5a964354f6671bbdf
parent2948d0a1e5aedc789fed27a4473040b6db741426
mptcp: fix race in release_cb

If we receive a MPTCP_PUSH_PENDING even from a subflow when
mptcp_release_cb() is serving the previous one, the latter
will be delayed up to the next release_sock(msk).

Address the issue implementing a test/serve loop for such
event.

Additionally rename the push helper to __mptcp_push_pending()
to be more consistent with the existing code.

Fixes: 6e628cd3a8f7 ("mptcp: use mptcp release_cb for delayed tasks")
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>
net/mptcp/protocol.c