* [PATCH net-next 00/10] mptcp: misc improvements for v7.5
@ 2026-12-04 21:44 Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 01/10] mptcp: pm: work on a copy of the received RM_ADDR list Matthieu Baerts (NGI0)
` (9 more replies)
0 siblings, 10 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Josef Bacik, Quanye Yang, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, linux-trace-kernel, Günther Noack,
Geliang Tang
Here are some unrelated improvements for MPTCP and its selftests:
- Patches 1-4: make sure RM_ADDR are not lost when receiving or sending
them, e.g. when they are close to each other or to an ADD_ADDR. These
are non-urgent fixes for issues found by code inspection or during a
review, that can be backported if needed.
- Patch 5: annotate lockless access to msk->scaling_ratio, reported by
KCSAN.
- Patch 6: print the right netns name when dumping stats in the
selftests.
- Patches 7-8: fix unlikely issues in the sockopt selftests, when read()
returns partial chunks, or the connection is closed early, but that
silence quite a few Sashiko reports when modifying this file.
- Patch 9: add a new msk_is_mptcp() helper, that will be used to add
MPTCP support to BPF sockmap and Landlock. Sending it now to avoid
conflicts in a future merge window.
- Patch 10: print stats before closing the socket in case of poll
timeout in the selftests, to help debugging such issues.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Geliang Tang (1):
mptcp: add msk_is_mptcp() helper
Josef Bacik (3):
mptcp: pm: work on a copy of the received RM_ADDR list
mptcp: pm: don't drop an RM_ADDR behind a pending one
mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
Matthieu Baerts (NGI0) (3):
mptcp: pm: keep an RM_ADDR when computing the MSS
selftests: mptcp: join: dump stats with right title
selftests: mptcp: print stats before socket closure
Quanye Yang (3):
mptcp: annotate lockless access to msk->scaling_ratio
selftests: mptcp: sockopt: pass total bytes to do_getsockopts
selftests: mptcp: sockopt: drop unreachable FIN accounting
include/net/mptcp.h | 12 +++++++
include/trace/events/mptcp.h | 2 +-
net/mptcp/options.c | 12 +++++--
net/mptcp/pm.c | 38 +++++++++++++++++------
net/mptcp/protocol.c | 11 +++++--
net/mptcp/protocol.h | 9 ++++--
tools/testing/selftests/net/mptcp/mptcp_connect.c | 15 +++++++++
tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 +-
tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 15 +++------
9 files changed, 86 insertions(+), 30 deletions(-)
---
base-commit: d5cf954cebe4f175dfd834e1dc471a3aa203ec7d
change-id: 20261204-net-next-mptcp-misc-feat-7-5-f6e63822520a
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH net-next 01/10] mptcp: pm: work on a copy of the received RM_ADDR list
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 02/10] mptcp: pm: don't drop an RM_ADDR behind a pending one Matthieu Baerts (NGI0)
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Josef Bacik
From: Josef Bacik <josef@toxicpanda.com>
The worker clears MPTCP_PM_RM_ADDR_RECEIVED and walks pm.rm_list_rx in
place. For every subflow it closes, mptcp_pm_rm_addr_or_subflow() drops
pm.lock. If the peer's next RM_ADDR arrives then, the flag is clear and
mptcp_pm_rm_addr_received() overwrites the list. The walk goes on at
its index in the new list: the ids of the first list that were still to
come are never handled, and their subflows stay.
Hand a copy of the list to the walk.
This issue has been found with the help of an LLM. It has not been
reproduced: the next RM_ADDR has to be processed while the worker has
dropped pm.lock to close a subflow, a window that a Packetdrill script
cannot target. This fix is based on code inspection only, which is
acceptable here: it is simple, and the issue is clear from the code.
Fixes: d0b698ca9a27 ("mptcp: remove multi addresses in PM")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ Commit message: how the issue was found, and why it is fine without
a reproducer. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/pm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index b0b71adefb8f..fd8dc1132ad1 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -827,7 +827,10 @@ static void mptcp_pm_rm_addr_or_subflow(struct mptcp_sock *msk,
static void mptcp_pm_rm_addr_recv(struct mptcp_sock *msk)
{
- mptcp_pm_rm_addr_or_subflow(msk, &msk->pm.rm_list_rx, MPTCP_MIB_RMADDR);
+ /* pm.lock is dropped on the way: the next RM_ADDR may come in */
+ struct mptcp_rm_list rm_list = msk->pm.rm_list_rx;
+
+ mptcp_pm_rm_addr_or_subflow(msk, &rm_list, MPTCP_MIB_RMADDR);
}
void mptcp_pm_rm_subflow(struct mptcp_sock *msk,
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 02/10] mptcp: pm: don't drop an RM_ADDR behind a pending one
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 01/10] mptcp: pm: work on a copy of the received RM_ADDR list Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR Matthieu Baerts (NGI0)
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Josef Bacik
From: Josef Bacik <josef@toxicpanda.com>
There is room for one received list of address ids. An RM_ADDR that
arrives before the worker has taken the previous one is counted as
RmAddrDrop and forgotten, although the netlink events for its ids have
been sent already. Two options follow each other at once if, for
instance, the path manager in user space of the peer removes two of its
addresses. The subflows to the second address stay.
Add the new ids to the pending list. Only the ids that do not fit in
the list of MPTCP_RM_IDS_MAX ids are dropped, and the RM_ADDR is then
counted as RmAddrDrop. The netlink events are not sent for the
dropped ids, and they are sent before the worker can act on the others.
This issue has been found with the help of an LLM. It has not been
reproduced: the second RM_ADDR has to be processed before the PM worker
gets to the first one, a window that a Packetdrill script cannot
target. This fix is based on code inspection only, which is acceptable
here: the issue is clear from the code, and the fix is simple.
Fixes: d0876b2284cf ("mptcp: add the incoming RM_ADDR support")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ Commit message: only the ids that do not fit are dropped + how the
issue was found, and why it is fine without a reproducer. No netlink
event for the dropped ids. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/pm.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index fd8dc1132ad1..dacd3cf358f5 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -843,17 +843,30 @@ void mptcp_pm_rm_addr_received(struct mptcp_sock *msk,
const struct mptcp_rm_list *rm_list)
{
struct mptcp_pm_data *pm = &msk->pm;
+ bool drop = false;
u8 i;
pr_debug("msk=%p remote_ids_nr=%d\n", msk, rm_list->nr);
- for (i = 0; i < rm_list->nr; i++)
- mptcp_event_addr_removed(msk, rm_list->ids[i]);
-
spin_lock_bh(&pm->lock);
if (mptcp_pm_schedule_work(msk, MPTCP_PM_RM_ADDR_RECEIVED))
- pm->rm_list_rx = *rm_list;
- else
+ pm->rm_list_rx.nr = 0;
+
+ /* the worker may not have got to the previous RM_ADDR yet */
+ for (i = 0; i < rm_list->nr; i++) {
+ u8 id = rm_list->ids[i];
+
+ if (!memchr(pm->rm_list_rx.ids, id, pm->rm_list_rx.nr)) {
+ if (pm->rm_list_rx.nr == MPTCP_RM_IDS_MAX) {
+ drop = true;
+ continue;
+ }
+ pm->rm_list_rx.ids[pm->rm_list_rx.nr++] = id;
+ }
+ /* not for the dropped ids, and before the worker acts */
+ mptcp_event_addr_removed(msk, id);
+ }
+ if (drop)
__MPTCP_INC_STATS(sock_net((struct sock *)msk), MPTCP_MIB_RMADDRDROP);
spin_unlock_bh(&pm->lock);
}
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 01/10] mptcp: pm: work on a copy of the received RM_ADDR list Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 02/10] mptcp: pm: don't drop an RM_ADDR behind a pending one Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-05 21:45 ` sashiko-bot
2026-12-04 21:44 ` [PATCH net-next 04/10] mptcp: pm: keep an RM_ADDR when computing the MSS Matthieu Baerts (NGI0)
` (6 subsequent siblings)
9 siblings, 1 reply; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Josef Bacik
From: Josef Bacik <josef@toxicpanda.com>
mptcp_pm_remove_addr() gives up, and counts RmAddrTxDrop, if any bit of
pm.addr_signal is set. That dates from the time when the byte was
cleared as a whole after a signal had been sent. Since
commit 119c022096f5 ("mptcp: fix ADD_ADDR and RM_ADDR maybe flush
addr_signal each other") an ADD_ADDR, an echo and an RM_ADDR each clear
their own bit, and they have storage of their own: pm.local, pm.remote
and pm.rm_list_tx. mptcp_pm_announce_addr() looks at its own bit only.
The callers have updated their state by then and ignore the result: the
endpoint is gone, the announcement is forgotten, and the peer never
learns that the address is not valid any more.
When the bit of an echo is set at the arrival of the peer's ADD_ADDR,
it stays set until the PM worker has sent the ACK. An endpoint that is
removed in between loses its RM_ADDR.
Only a pending RM_ADDR stands in the way, as rm_list_tx would be
overwritten. The ACK that is sent at once carries the ADD_ADDR or the
echo then, and the RM_ADDR goes with a later packet. That is fine: an
ADD_ADDR, an echo and an RM_ADDR should rarely have to be sent at the
same time.
This issue has been found with the help of an LLM. It has not been
reproduced: the endpoint has to be removed before the PM worker sends
the pending ADD_ADDR or echo, a window that a Packetdrill script cannot
target. This fix is based on code inspection only, which is acceptable
here: the issue is clear from the code, and the fix is a one-liner.
Fixes: 119c022096f5 ("mptcp: fix ADD_ADDR and RM_ADDR maybe flush addr_signal each other")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ Use mptcp_pm_should_rm_signal() instead of a comment. Fixes tag:
119c022096f5 instead of 42842a425ad6. Commit message: remove the
number of attempts, say which packet carries the RM_ADDR then, and
when the echo bit is set + how the issue was found, and why it is fine
without a reproducer. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index dacd3cf358f5..f12a8bfbb2a9 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -529,7 +529,7 @@ int mptcp_pm_remove_addr(struct mptcp_sock *msk, const struct mptcp_rm_list *rm_
pr_debug("msk=%p, rm_list_nr=%d\n", msk, rm_list->nr);
- if (rm_addr) {
+ if (mptcp_pm_should_rm_signal(msk)) {
MPTCP_ADD_STATS(sock_net((struct sock *)msk),
MPTCP_MIB_RMADDRTXDROP, rm_list->nr);
return -EINVAL;
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 04/10] mptcp: pm: keep an RM_ADDR when computing the MSS
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (2 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 05/10] mptcp: annotate lockless access to msk->scaling_ratio Matthieu Baerts (NGI0)
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0)
tcp_current_mss() calls mptcp_established_options() without skb, to
know the size of the options. A pending RM_ADDR was then taken: its
signal bit was cleared, and RmAddrTx was incremented, but it was not
sent. The peer then never learnt that the address was not valid any
more. An ADD_ADDR is not affected: it is only sent with a pure ACK.
Without skb, only reserve the size of the RM_ADDR, and keep it pending
for the packet that will be sent.
This issue has been reported by Clashiko, while reviewing commit
"mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR", and
confirmed with a script: data was sent while the RM_ADDR was pending.
RmAddrTx was then 1 on the sender, but RmAddr 0 on the receiver.
Fixes: 5cb104ae55e9 ("mptcp: add the outgoing RM_ADDR support")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/options.c | 12 +++++++++---
net/mptcp/pm.c | 8 ++++++--
net/mptcp/protocol.h | 3 ++-
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 617358ff7f99..3b10884526b0 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -762,7 +762,8 @@ static bool mptcp_established_options_add_addr(struct sock *sk,
return true;
}
-static bool mptcp_established_options_rm_addr(struct sock *sk, int *size,
+static bool mptcp_established_options_rm_addr(struct sock *sk,
+ struct sk_buff *skb, int *size,
unsigned int remaining,
struct mptcp_out_options *opts)
{
@@ -772,9 +773,13 @@ static bool mptcp_established_options_rm_addr(struct sock *sk, int *size,
int i;
if (!mptcp_pm_should_rm_signal(msk) ||
- !(mptcp_pm_rm_addr_signal(msk, remaining, &rm_list, size)))
+ !(mptcp_pm_rm_addr_signal(msk, remaining, &rm_list, size, !skb)))
return false;
+ /* without skb, only the size is needed: keep it for the next packet */
+ if (!skb)
+ return true;
+
opts->suboptions |= OPTION_MPTCP_RM_ADDR;
opts->rm_list = rm_list;
@@ -933,7 +938,8 @@ int mptcp_established_options(struct sock *sk, struct sk_buff *skb,
total_size += opt_size;
remaining -= opt_size;
ret = true;
- } else if (mptcp_established_options_rm_addr(sk, &opt_size, remaining, opts)) {
+ } else if (mptcp_established_options_rm_addr(sk, skb, &opt_size,
+ remaining, opts)) {
total_size += opt_size;
remaining -= opt_size;
ret = true;
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index f12a8bfbb2a9..1d114e3b3284 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -1016,7 +1016,8 @@ static int mptcp_rm_addr_len(const struct mptcp_rm_list *rm_list)
}
bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
- struct mptcp_rm_list *rm_list, int *size)
+ struct mptcp_rm_list *rm_list, int *size,
+ bool size_only)
{
int ret = false, len;
u8 rm_addr;
@@ -1037,9 +1038,12 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
goto out_unlock;
*size = len;
+ ret = true;
+ if (size_only)
+ goto out_unlock;
+
*rm_list = msk->pm.rm_list_tx;
WRITE_ONCE(msk->pm.addr_signal, rm_addr);
- ret = true;
out_unlock:
spin_unlock_bh(&msk->pm.lock);
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 7644651f01a8..255b2e761f7d 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -1243,7 +1243,8 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, int *size, int remaining,
struct mptcp_addr_info *addr, bool *echo,
bool *drop_ts);
bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
- struct mptcp_rm_list *rm_list, int *len);
+ struct mptcp_rm_list *rm_list, int *len,
+ bool size_only);
int mptcp_pm_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk,
struct mptcp_pm_addr_entry *skc);
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 05/10] mptcp: annotate lockless access to msk->scaling_ratio
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (3 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 04/10] mptcp: pm: keep an RM_ADDR when computing the MSS Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 06/10] selftests: mptcp: join: dump stats with right title Matthieu Baerts (NGI0)
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Quanye Yang, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
linux-trace-kernel
From: Quanye Yang <quanyeyang@proton.me>
mptcp_rcv_rtt_update() writes msk->scaling_ratio from BH while holding
the msk data lock (sk->sk_lock.slock). mptcp_cleanup_rbuf() reads the
same byte via mptcp_win_from_space() after mptcp_release_cb() drops
that lock, so it can run concurrently with the RX path.
KCSAN reports:
BUG: KCSAN: data-race in mptcp_cleanup_rbuf / mptcp_data_ready
write to 0xffff888014978790 of 1 bytes by interrupt on cpu 1:
mptcp_rcv_rtt_update net/mptcp/protocol.c:1045 [inline]
mptcp_data_ready+0x1c1/0x4d0 net/mptcp/protocol.c:1062
subflow_data_ready+0x271/0x350 net/mptcp/subflow.c:1536
tcp_data_ready+0x92/0x2c0 net/ipv4/tcp_input.c:5604
tcp_data_queue+0x1236/0x26c0 net/ipv4/tcp_input.c:5694
tcp_rcv_established+0x695/0x1fb0 net/ipv4/tcp_input.c:6689
tcp_v4_do_rcv+0x356/0x6e0 net/ipv4/tcp_ipv4.c:1854
tcp_v4_rcv+0x1b04/0x26b0 net/ipv4/tcp_ipv4.c:2248
read to 0xffff888014978790 of 1 bytes by task 2624 on cpu 0:
mptcp_win_from_space net/mptcp/protocol.h:421 [inline]
__mptcp_space net/mptcp/protocol.h:431 [inline]
mptcp_cleanup_rbuf+0x8a/0x380 net/mptcp/protocol.c:680
mptcp_release_cb+0x375/0x900 net/mptcp/protocol.c:3889
release_sock+0x100/0x150 net/core/sock.c:3866
sk_wait_data+0x141/0x2f0 net/core/sock.c:3314
mptcp_recvmsg+0x6cd/0xd50 net/mptcp/protocol.c:2496
value changed: 0xd0 -> 0xd5
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 2624 Comm: syz.7.22 Not tainted 7.3.0-rc1-gbaff4b3d06ef #77 PREEMPT(full)
The u8 EWMA is used only to convert sk_rcvbuf occupancy into an
advertised window. A slightly stale ratio is acceptable, so annotate
the lockless accesses with READ_ONCE()/WRITE_ONCE() instead of
widening the data lock. Do the same in mptcp_space_from_win(), which
reads the same field from DRS and SO_RCVLOWAT.
Fixes: d2000361e4dd ("mptcp: better mptcp-level RTT estimator")
Reported-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/634
Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
To: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: linux-trace-kernel@vger.kernel.org
---
include/trace/events/mptcp.h | 2 +-
net/mptcp/protocol.c | 11 ++++++++---
net/mptcp/protocol.h | 6 ++++--
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/include/trace/events/mptcp.h b/include/trace/events/mptcp.h
index 22882bd03459..c47fa2672b84 100644
--- a/include/trace/events/mptcp.h
+++ b/include/trace/events/mptcp.h
@@ -229,7 +229,7 @@ TRACE_EVENT(mptcp_rcvbuf_grow,
__entry->rcvbuf = sk->sk_rcvbuf;
__entry->rcv_wnd = atomic64_read(&msk->rcv_wnd_sent) -
msk->ack_seq;
- __entry->scaling_ratio = msk->scaling_ratio;
+ __entry->scaling_ratio = READ_ONCE(msk->scaling_ratio);
__entry->sport = ntohs(inet->inet_sport);
__entry->dport = ntohs(inet->inet_dport);
__entry->family = sk->sk_family;
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 667cbd7895a7..4505f5a75042 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -982,6 +982,7 @@ static void mptcp_rcv_rtt_update(struct mptcp_sock *msk,
{
const struct tcp_sock *tp = tcp_sk(subflow->tcp_sock);
u32 rtt_us = tp->rcv_rtt_est.rtt_us;
+ u8 scaling_ratio;
int id;
/* Update once per subflow per rcvwnd to avoid touching the msk
@@ -998,9 +999,13 @@ static void mptcp_rcv_rtt_update(struct mptcp_sock *msk,
if (++msk->rcv_rtt_est.next_sample == MPTCP_RTT_SAMPLES)
msk->rcv_rtt_est.next_sample = 0;
- /* EWMA among the incoming subflows */
- msk->scaling_ratio = ((msk->scaling_ratio << 3) - msk->scaling_ratio +
- tp->scaling_ratio) >> 3;
+ /* EWMA among the incoming subflows.
+ * Pairs with READ_ONCE() in mptcp_win_from_space().
+ */
+ scaling_ratio = READ_ONCE(msk->scaling_ratio);
+ WRITE_ONCE(msk->scaling_ratio,
+ ((scaling_ratio << 3) - scaling_ratio +
+ tp->scaling_ratio) >> 3);
}
void mptcp_data_ready(struct sock *sk, struct sock *ssk)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 255b2e761f7d..a96b999731a6 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -431,12 +431,14 @@ static inline void msk_owned_by_me(const struct mptcp_sock *msk)
static inline int mptcp_win_from_space(const struct sock *sk, int space)
{
- return __tcp_win_from_space(mptcp_sk(sk)->scaling_ratio, space);
+ return __tcp_win_from_space(READ_ONCE(mptcp_sk(sk)->scaling_ratio),
+ space);
}
static inline int mptcp_space_from_win(const struct sock *sk, int win)
{
- return __tcp_space_from_win(mptcp_sk(sk)->scaling_ratio, win);
+ return __tcp_space_from_win(READ_ONCE(mptcp_sk(sk)->scaling_ratio),
+ win);
}
static inline int __mptcp_space(const struct sock *sk)
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 06/10] selftests: mptcp: join: dump stats with right title
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (4 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 05/10] mptcp: annotate lockless access to msk->scaling_ratio Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 07/10] selftests: mptcp: sockopt: pass total bytes to do_getsockopts Matthieu Baerts (NGI0)
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0)
This fixes a typo when dumping stats to print the right netns.
Indeed, the client netns was hardcoded instead of taking the netns given
in argument. Fixing that to avoid confusions when debugging issues.
Fixes: 658e53141780 ("selftests: mptcp: join: dump stats from history")
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index f4d8afaeda4f..c3ccce96b45b 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -1174,7 +1174,7 @@ _dump_stats()
local ns="${1}"
local side="${2}"
- mptcp_lib_print_err "${side} ns stats (${ns2})"
+ mptcp_lib_print_err "${side} ns stats (${ns})"
mptcp_lib_pr_nstat "${ns}"
echo
}
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 07/10] selftests: mptcp: sockopt: pass total bytes to do_getsockopts
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (5 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 06/10] selftests: mptcp: join: dump stats with right title Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 08/10] selftests: mptcp: sockopt: drop unreachable FIN accounting Matthieu Baerts (NGI0)
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Quanye Yang, Geliang Tang
From: Quanye Yang <quanyeyang@proton.me>
connect_one_server() reads the echoed payload in a loop because read()
on a stream socket can return a partial chunk. After the loop, it still
passed the last read() return value to do_getsockopts() instead of the
accumulated byte count.
do_getsockopts() checks MPTCP_INFO first. The client samples
mptcpi_write_seq before write(), and write() has already advanced
msk->write_seq by the full length, so a partial last read() makes
the write_seq assert fail. Pass the total instead.
This issue has been reported by Sashiko and not seen in CI environments.
Yet, it could be visible, especially when the test is launched manually.
Fixes: ce9979129a0b ("selftests: mptcp: add mptcp getsockopt test cases")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/638
Co-developed-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
index b6e58d936ebe..7b4ccbe10ae1 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
@@ -627,7 +627,7 @@ static void connect_one_server(int fd, int pipefd)
if (s.tcpi_rcv_delta)
assert(s.tcpi_rcv_delta <= total);
- do_getsockopts(&s, fd, ret, ret);
+ do_getsockopts(&s, fd, total, total);
if (eof)
total += 1; /* sequence advances due to FIN */
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 08/10] selftests: mptcp: sockopt: drop unreachable FIN accounting
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (6 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 07/10] selftests: mptcp: sockopt: pass total bytes to do_getsockopts Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 09/10] mptcp: add msk_is_mptcp() helper Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 10/10] selftests: mptcp: print stats before socket closure Matthieu Baerts (NGI0)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Quanye Yang
From: Quanye Yang <quanyeyang@proton.me>
connect_one_server() sets eof when read() returns 0, then immediately
checks total != len. The receive loop only observes EOF while total is
still below len, so that check always fires and xerror() terminates the
process. The later if (eof) block that increments total for DATA_FIN is
therefore unreachable.
The client also does not wait for the peer to close: process_one_client()
blocks on hangup first, so a peer DATA_FIN cannot arrive before this
assertion. DATA_FIN sequence advancement is already checked on the server
after EOF. Treat an early EOF as a hard error and drop the dead
adjustment.
This issue has been reported by Sashiko and not seen in CI environments.
Yet, it could be visible, especially when the test is launched manually.
Fixes: ce9979129a0b ("selftests: mptcp: add mptcp getsockopt test cases")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/637
Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
index 7b4ccbe10ae1..10bef56acc6c 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
@@ -572,7 +572,6 @@ static void connect_one_server(int fd, int pipefd)
char buf[4096], buf2[4096];
size_t len, i, total;
struct so_state s;
- bool eof = false;
ssize_t ret;
memset(&s, 0, sizeof(s));
@@ -610,16 +609,15 @@ static void connect_one_server(int fd, int pipefd)
ret = read(fd, buf2 + total, sizeof(buf2) - total);
if (ret < 0)
die_perror("read");
- if (ret == 0) {
- eof = true;
- break;
- }
+ if (ret == 0)
+ xerror("unexpected EOF, total %lu, len %lu\n",
+ total, len);
total += ret;
} while (total < len);
if (total != len)
- xerror("total %lu, len %lu eof %d\n", total, len, eof);
+ xerror("total %lu, len %lu\n", total, len);
if (memcmp(buf, buf2, len))
xerror("data corruption");
@@ -629,9 +627,6 @@ static void connect_one_server(int fd, int pipefd)
do_getsockopts(&s, fd, total, total);
- if (eof)
- total += 1; /* sequence advances due to FIN */
-
assert(s.mptcpi_rcv_delta == (uint64_t)total);
close(fd);
}
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 09/10] mptcp: add msk_is_mptcp() helper
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (7 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 08/10] selftests: mptcp: sockopt: drop unreachable FIN accounting Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 10/10] selftests: mptcp: print stats before socket closure Matthieu Baerts (NGI0)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0),
Günther Noack, Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Introduce msk_is_mptcp() to check whether a socket is an MPTCP socket
(IPPROTO_MPTCP on SOCK_STREAM), modeled after sk_is_tcp(). Unlike
sk_is_mptcp() which tests a TCP subflow socket, this helper takes an
MPTCP socket directly.
The naming follows the convention of rsk_is_mptcp() to distinguish it
from sk_is_mptcp(). This helper will be used alongside sk_is_tcp() to
add MPTCP support for BPF sockmap, Landlock and in other places where
MPTCP socket type checking is going to be needed.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
include/net/mptcp.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index ad7005b574bb..53ec88673368 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -144,6 +144,13 @@ static inline bool rsk_drop_req(const struct request_sock *req)
return tcp_rsk(req)->is_mptcp && tcp_rsk(req)->drop_req;
}
+static inline bool msk_is_mptcp(const struct sock *sk)
+{
+ return sk_is_inet(sk) &&
+ sk->sk_type == SOCK_STREAM &&
+ sk->sk_protocol == IPPROTO_MPTCP;
+}
+
void mptcp_space(const struct sock *ssk, int *space, int *full_space);
bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
unsigned int *size, struct mptcp_out_options *opts);
@@ -255,6 +262,11 @@ static inline bool rsk_drop_req(const struct request_sock *req)
return false;
}
+static inline bool msk_is_mptcp(const struct sock *sk)
+{
+ return false;
+}
+
static inline bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
unsigned int *size,
struct mptcp_out_options *opts)
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 10/10] selftests: mptcp: print stats before socket closure
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
` (8 preceding siblings ...)
2026-12-04 21:44 ` [PATCH net-next 09/10] mptcp: add msk_is_mptcp() helper Matthieu Baerts (NGI0)
@ 2026-12-04 21:44 ` Matthieu Baerts (NGI0)
9 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-12-04 21:44 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
Yonglong Li, Shuah Khan, Florian Westphal
Cc: netdev, mptcp, linux-kselftest, Matthieu Baerts (NGI0)
In case of poll timeout, it might be too late to print the stats after
the socket closure.
Now, in case of poll timeout, 'ss' and 'nstat' are invoked from
mptcp_connect to print the stats before exiting. This should help
debugging poll timeout issues.
Note: for this "workaround", system() is used for debugging purposes
only. The returned result can then be safely ignored, hence the (void)!
to avoid unused-result warnings.
Also, 'nstat *Tcp*' will print '#kernel' at the top, but that's OK, and
it seems better to avoid using a pipe here.
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index 178d98d91fea..8c788977e594 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -210,6 +210,19 @@ static void xgetaddrinfo(const char *node, const char *service,
}
}
+static void print_err_stats(void)
+{
+ char cmd[128];
+
+ snprintf(cmd, sizeof(cmd), "ss -Menitam -o '%cport = :%s' >&2",
+ listen_mode ? 's' : 'd', cfg_port);
+
+ fprintf(stderr, "socket stats before socket closure:\n");
+ (void)!system(cmd);
+ (void)!system("NSTAT_HISTORY=\"/tmp/$(ip netns identify).nstat\" "
+ "nstat -s '*Tcp*' >&2");
+}
+
static void set_rcvbuf(int fd, unsigned int size)
{
int err;
@@ -658,6 +671,7 @@ static int copyfd_io_poll(int infd, int peerfd, int outfd,
fprintf(stderr, "%s: poll timed out (events: "
"POLLIN %u, POLLOUT %u)\n", __func__,
fds.events & POLLIN, fds.events & POLLOUT);
+ print_err_stats();
return 2;
}
@@ -1196,6 +1210,7 @@ int main_loop_s(int listensock)
return 1;
case 0:
fprintf(stderr, "%s: timed out\n", __func__);
+ print_err_stats();
close(listensock);
return 2;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
2026-12-04 21:44 ` [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR Matthieu Baerts (NGI0)
@ 2026-12-05 21:45 ` sashiko-bot
0 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-12-05 21:45 UTC (permalink / raw)
To: Matthieu Baerts (NGI0); +Cc: mptcp
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] mptcp: pm: mptcp_pm_remove_addr() leaves RM_ADDR unsent
behind ADD_ADDR
--
commit ae45d6f32d8cb1d980533b6114831ae762e410fd
Author: Josef Bacik <josef@toxicpanda.com>
mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
This commit changes mptcp_pm_remove_addr() to check only
MPTCP_RM_ADDR_SIGNAL via mptcp_pm_should_rm_signal() instead of any bit
in msk->pm.addr_signal, so that an RM_ADDR is not dropped when an
ADD_ADDR or echo is pending.
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index dacd3cf358f5a..f12a8bfbb2a9a 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -529,7 +529,7 @@ int mptcp_pm_remove_addr(struct mptcp_sock *msk, const struct mptcp_rm_list *rm_
>
> pr_debug("msk=%p, rm_list_nr=%d\n", msk, rm_list->nr);
>
> - if (rm_addr) {
> + if (mptcp_pm_should_rm_signal(msk)) {
> MPTCP_ADD_STATS(sock_net((struct sock *)msk),
> MPTCP_MIB_RMADDRTXDROP, rm_list->nr);
> return -EINVAL;
[Severity: Medium]
Does returning from mptcp_pm_remove_addr() with MPTCP_RM_ADDR_SIGNAL
still pending defeat subflow avoidance and drop or strand RM_ADDR
notifications?
mptcp_pm_remove_addr() calls mptcp_pm_addr_send_ack_avoid_list() once,
but mptcp_established_options() evaluates ADD_ADDR/echo ahead of
else if (mptcp_established_options_rm_addr()). That single pure ACK
consumes the ADD_ADDR or echo and leaves MPTCP_RM_ADDR_SIGNAL set.
In mptcp_nl_remove_subflow_and_signal_addr(), the caller still holds
lock_sock(sk) and immediately calls mptcp_pm_rm_subflow(). Its
mptcp_subflow_shutdown() -> tcp_send_ack() then sends the leftover
RM_ADDR over the removed subflow instead of a healthy one.
This defeats commit fb8d0bccb221 ("mptcp: pm: avoid sending RM_ADDR
over same subflow") and loses the RM_ADDR when the removed interface
is already down.
In mptcp_pm_flush_addrs_and_subflows(), flushing more than
MPTCP_RM_IDS_MAX announced-only endpoints loops immediately under the
same lock_sock(sk), sees MPTCP_RM_ADDR_SIGNAL still set, and drops the
next batch with MPTCP_MIB_RMADDRTXDROP.
On an idle connection with no subflow shutdown (for example, removing
a signal-only endpoint while both ADD_ADDR and echo are pending),
MPTCP_RM_ADDR_SIGNAL can stay stranded until unrelated traffic occurs.
Calling mptcp_pm_addr_send_ack_avoid_list() in a bounded loop while
mptcp_pm_should_rm_signal(msk) stays set and msk->pm.addr_signal
clears a bit would flush the pending signals over the healthy subflow
before returning.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org?part=3
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-12-05 21:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 21:44 [PATCH net-next 00/10] mptcp: misc improvements for v7.5 Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 01/10] mptcp: pm: work on a copy of the received RM_ADDR list Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 02/10] mptcp: pm: don't drop an RM_ADDR behind a pending one Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR Matthieu Baerts (NGI0)
2026-12-05 21:45 ` sashiko-bot
2026-12-04 21:44 ` [PATCH net-next 04/10] mptcp: pm: keep an RM_ADDR when computing the MSS Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 05/10] mptcp: annotate lockless access to msk->scaling_ratio Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 06/10] selftests: mptcp: join: dump stats with right title Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 07/10] selftests: mptcp: sockopt: pass total bytes to do_getsockopts Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 08/10] selftests: mptcp: sockopt: drop unreachable FIN accounting Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 09/10] mptcp: add msk_is_mptcp() helper Matthieu Baerts (NGI0)
2026-12-04 21:44 ` [PATCH net-next 10/10] selftests: mptcp: print stats before socket closure Matthieu Baerts (NGI0)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.