All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry on id 0 removal
@ 2026-06-22  9:28 Kalpan Jani
  2026-06-22  9:28 ` [PATCH net v4 1/2] mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint Kalpan Jani
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Kalpan Jani @ 2026-06-22  9:28 UTC (permalink / raw)
  To: mptcp
  Cc: matttbe, martineau, pabeni, cuitao, syzbot+55c2a5c871441261ed14,
	shardul.b, janak, kalpanjani009, shardulsb08, Kalpan Jani

Hi Tao, Matt,

Thank you Tao for identifying the port mismatch in v3 and providing a
deterministic reproducer — both are incorporated in this series.

The problem with v3: mptcp_remove_anno_list_by_saddr() compares
addresses with use_port=true. Signal endpoints added without an
explicit port are stored in the anno_list with port 0, but msk_local
carries the connection's actual local port. So the v3 lookup always
missed the stale entry, making the patch a no-op. Confirmed with a
temporary printk showing msk_local.port=5000 and announced=0 on v3,
and announced=1 after clearing the port.

This series:

Patch 1 fixes mptcp_nl_remove_id_zero_address() to tear down the
pending ADD_ADDR symmetrically with the non-zero id path: copy
msk_local, clear the port, call mptcp_remove_anno_list_by_saddr(),
and decrement add_addr_signaled if announced.

Patch 2 adds the regression test based on Tao's reproducer. Verified:
  - unpatched kernel: WARNING: net/mptcp/pm fires, test reports FAIL
  - patched kernel:   no WARNING, test reports PASS

Tested with mptcp/mptcp-upstream-virtme-docker auto-normal. All
existing selftests pass (packetdrill_add_addr failure is pre-existing
and unrelated to this series).

Kalpan Jani (2):
  mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint
  selftests: mptcp: add regression test for stale ADD_ADDR on id 0
    removal

 net/mptcp/pm_kernel.c                         |  8 ++
 .../net/mptcp/mptcp_id0_stale_anno.sh         | 85 +++++++++++++++++++
 2 files changed, 93 insertions(+)
 create mode 100755 tools/testing/selftests/net/mptcp/mptcp_id0_stale_anno.sh

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-25 12:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22  9:28 [PATCH net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry on id 0 removal Kalpan Jani
2026-06-22  9:28 ` [PATCH net v4 1/2] mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint Kalpan Jani
2026-06-22  9:28 ` [PATCH net v4 2/2] selftests: mptcp: add regression test for stale ADD_ADDR on id 0 removal Kalpan Jani
2026-06-22 17:22   ` Matthieu Baerts
2026-06-23  8:40   ` kernel test robot
2026-06-23 10:23   ` kernel test robot
2026-06-22  9:57 ` [PATCH net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry " MPTCP CI
2026-06-22 10:16 ` MPTCP CI
2026-06-25 12:31 ` [PATCH net v4 1/2] mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint Tao Cui

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.