]> 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)
commit334229a63f3b1c32f0e815fb11e7fb13a5f234c9
treea9a75478a269f03eda15ee62589df57680c7c9a9
parent7809c14afe72a7bb71847433956a27b0bb7686fd
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: 0ab3466cc681 ("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