]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: consistent map handling on failure
authorPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jun 2022 01:02:39 +0000 (18:02 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Jun 2022 03:45:42 +0000 (20:45 -0700)
commit39ebfa2b6d94a902bbfa6400b063971dbc13519e
treea9a75478a269f03eda15ee62589df57680c7c9a9
parent6af84f4fcada55f2e25fbb1ade2ae2a7bad42c1c
mptcp: consistent map handling on failure

When the MPTCP receive path reach a non fatal fall-back condition, e.g.
when the MPC sockets must fall-back to TCP, the existing code is a little
self-inconsistent: it reports that new data is available - return true -
but sets the MPC flag to the opposite value.

As the consequence read operations in some exceptional scenario may block
unexpectedly.

Address the issue setting the correct MPC read status. Additionally avoid
some code duplication in the fatal fall-back scenario.

Fixes: eed2062cd5ff ("mptcp: add MP_FAIL response support")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/subflow.c