Commit 3a13454
mptcp: fix duplicate reset on fastclose
commit ae15506 upstream.
The CI reports sporadic failures of the fastclose self-tests. The root
cause is a duplicate reset, not carrying the relevant MPTCP option.
In the failing scenario the bad reset is received by the peer before
the fastclose one, preventing the reception of the latter.
Indeed there is window of opportunity at fastclose time for the
following race:
mptcp_do_fastclose
__mptcp_close_ssk
__tcp_close()
tcp_set_state() [1]
tcp_send_active_reset() [2]
After [1] the stack will send reset to in-flight data reaching the now
closed port. Such reset may race with [2].
Address the issue explicitly sending a single reset on fastclose before
explicitly moving the subflow to close status.
Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios")
Cc: stable@vger.kernel.org
Closes: multipath-tcp/mptcp_net-next#596
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Geliang Tang <geliang@kernel.org>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251118-net-mptcp-misc-fixes-6-18-rc6-v1-6-806d3781c95f@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ No conflicts, but tcp_send_active_reset() doesn't take a 3rd argument
(sk_rst_reason) in this version, see commit 5691276 ("rstreason:
prepare for active reset"). This argument is only helpful for tracing,
it is fine to drop it. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent b77075c commit 3a13454
1 file changed
Lines changed: 22 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2431 | 2431 | | |
2432 | 2432 | | |
2433 | 2433 | | |
2434 | | - | |
2435 | 2434 | | |
2436 | 2435 | | |
2437 | 2436 | | |
| |||
2442 | 2441 | | |
2443 | 2442 | | |
2444 | 2443 | | |
2445 | | - | |
| 2444 | + | |
2446 | 2445 | | |
2447 | 2446 | | |
2448 | 2447 | | |
| |||
2489 | 2488 | | |
2490 | 2489 | | |
2491 | 2490 | | |
2492 | | - | |
2493 | | - | |
2494 | | - | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
2498 | | - | |
2499 | | - | |
| 2491 | + | |
| 2492 | + | |
2500 | 2493 | | |
2501 | 2494 | | |
2502 | 2495 | | |
| |||
2809 | 2802 | | |
2810 | 2803 | | |
2811 | 2804 | | |
2812 | | - | |
2813 | | - | |
2814 | | - | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
2815 | 2824 | | |
2816 | 2825 | | |
2817 | 2826 | | |
| |||
0 commit comments