Paolo Abeni
90918ef995
mptcp: more conservative check for zero probes
...
[ Upstream commit 72377ab2d671befd6390a1d5677f5cca61235b65 ]
Christoph reported that the MPTCP protocol can find the subflow-level
write queue unexpectedly not empty while crafting a zero-window probe,
hitting a warning:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 188 at net/mptcp/protocol.c:1312 mptcp_sendmsg_frag+0xc06/0xe70
Modules linked in:
CPU: 0 PID: 188 Comm: kworker/0:2 Not tainted 6.6.0-rc2-g1176aa719d7a #47
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014
Workqueue: events mptcp_worker
RIP: 0010:mptcp_sendmsg_frag+0xc06/0xe70 net/mptcp/protocol.c:1312
RAX: 47d0530de347ff6a RBX: 47d0530de347ff6b RCX: ffff8881015d3c00
RDX: ffff8881015d3c00 RSI: 47d0530de347ff6b RDI: 47d0530de347ff6b
RBP: 47d0530de347ff6b R08: ffffffff8243c6a8 R09: ffffffff82042d9c
R10: 0000000000000002 R11: ffffffff82056850 R12: ffff88812a13d580
R13: 0000000000000001 R14: ffff88812b375e50 R15: ffff88812bbf3200
FS: 0000000000000000(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000695118 CR3: 0000000115dfc001 CR4: 0000000000170ef0
Call Trace:
<TASK>
__subflow_push_pending+0xa4/0x420 net/mptcp/protocol.c:1545
__mptcp_push_pending+0x128/0x3b0 net/mptcp/protocol.c:1614
mptcp_release_cb+0x218/0x5b0 net/mptcp/protocol.c:3391
release_sock+0xf6/0x100 net/core/sock.c:3521
mptcp_worker+0x6e8/0x8f0 net/mptcp/protocol.c:2746
process_scheduled_works+0x341/0x690 kernel/workqueue.c:2630
worker_thread+0x3a7/0x610 kernel/workqueue.c:2784
kthread+0x143/0x180 kernel/kthread.c:388
ret_from_fork+0x4d/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:304
</TASK>
The root cause of the issue is that expectations are wrong: e.g. due
to MPTCP-level re-injection we can hit the critical condition.
Explicitly avoid the zero-window probe when the subflow write queue
is not empty and drop the related warnings.
Reported-by: Christoph Paasch <cpaasch@apple.com>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/444
Fixes: f70cad1085d1 ("mptcp: stop relying on tcp_tx_skb_cache")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231018-send-net-20231018-v1-3-17ecb002e41d@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-08 17:26:35 +01:00
..
2023-09-19 12:22:27 +02:00
2022-12-31 13:14:42 +01:00
2023-05-24 17:36:52 +01:00
2023-06-09 10:32:26 +02:00
2022-06-22 14:22:01 +02:00
2023-08-30 16:18:18 +02:00
2023-10-25 11:59:04 +02:00
2022-12-31 13:14:11 +01:00
2023-10-06 13:18:07 +02:00
2023-03-17 08:48:54 +01:00
2023-08-30 16:18:20 +02:00
2023-10-19 23:05:36 +02:00
2023-10-25 11:59:01 +02:00
2023-08-11 15:13:53 +02:00
2023-10-06 13:18:06 +02:00
2023-07-23 13:47:30 +02:00
2023-05-17 11:50:18 +02:00
2023-09-19 12:23:03 +02:00
2022-11-03 23:59:14 +09:00
2023-11-08 17:26:35 +01:00
2023-10-25 11:59:04 +02:00
2023-03-22 13:31:28 +01:00
2023-09-19 12:23:04 +02:00
2023-08-26 14:23:32 +02:00
2023-10-10 21:59:07 +02:00
2022-04-27 14:38:53 +02:00
2023-07-27 08:47:02 +02:00
2023-10-25 11:59:00 +02:00
2022-12-14 11:37:25 +01:00
2023-10-25 11:58:59 +02:00
2023-02-22 12:57:09 +01:00
2023-11-08 17:26:35 +01:00
2023-10-06 13:18:18 +02:00
2023-10-25 11:58:57 +02:00
2023-09-19 12:22:29 +02:00
2023-07-23 13:46:56 +02:00
2023-09-19 12:22:35 +02:00
2023-10-25 11:58:55 +02:00
2023-05-24 17:36:51 +01:00
2023-02-22 12:57:09 +01:00
2023-08-16 18:22:01 +02:00
2022-01-11 15:35:16 +01:00
2023-04-20 12:13:53 +02:00
2023-10-19 23:05:33 +02:00
2023-10-25 11:58:57 +02:00
2023-02-22 12:57:02 +01:00
2023-05-17 11:50:17 +02:00
2023-10-25 11:58:57 +02:00
2023-10-10 21:59:08 +02:00
2023-10-19 23:05:34 +02:00
2021-11-18 19:17:11 +01:00
2023-10-06 13:18:22 +02:00
2023-10-10 21:59:08 +02:00
2023-09-19 12:23:04 +02:00
2023-09-19 12:22:59 +02:00
2023-05-24 17:36:49 +01:00
2023-10-25 11:59:00 +02:00
2023-02-09 11:26:40 +01:00
2023-09-19 12:22:58 +02:00
2023-10-25 11:58:56 +02:00
2023-06-21 15:59:15 +02:00
2023-06-21 15:59:15 +02:00
2023-10-19 23:05:33 +02:00