Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'mptcp-misc-fixes-for-v6-19-rc1'

Matthieu Baerts says:

====================
mptcp: misc fixes for v6.19-rc1

Here are various unrelated fixes:

- Patches 1-2: ignore unknown in-kernel PM endpoint flags instead of
pretending they are supported. A fix for v5.7.

- Patch 3: avoid potential unnecessary rtx timer expiration. A fix for
v5.15.

- Patch 4: avoid a deadlock on fallback in case of SKB creation failure
while re-injecting.
====================

Link: https://patch.msgid.link/20251205-net-mptcp-misc-fixes-6-19-rc1-v1-0-9e4781a6c1b8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+32 -9
+1
include/uapi/linux/mptcp.h
··· 40 40 #define MPTCP_PM_ADDR_FLAG_FULLMESH _BITUL(3) 41 41 #define MPTCP_PM_ADDR_FLAG_IMPLICIT _BITUL(4) 42 42 #define MPTCP_PM_ADDR_FLAG_LAMINAR _BITUL(5) 43 + #define MPTCP_PM_ADDR_FLAGS_MASK GENMASK(5, 0) 43 44 44 45 struct mptcp_info { 45 46 __u8 mptcpi_subflows;
+2 -1
net/mptcp/pm_netlink.c
··· 119 119 } 120 120 121 121 if (tb[MPTCP_PM_ADDR_ATTR_FLAGS]) 122 - entry->flags = nla_get_u32(tb[MPTCP_PM_ADDR_ATTR_FLAGS]); 122 + entry->flags = nla_get_u32(tb[MPTCP_PM_ADDR_ATTR_FLAGS]) & 123 + MPTCP_PM_ADDR_FLAGS_MASK; 123 124 124 125 if (tb[MPTCP_PM_ADDR_ATTR_PORT]) 125 126 entry->addr.port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]));
+14 -8
net/mptcp/protocol.c
··· 1623 1623 struct mptcp_sendmsg_info info = { 1624 1624 .flags = flags, 1625 1625 }; 1626 - bool do_check_data_fin = false; 1626 + bool copied = false; 1627 1627 int push_count = 1; 1628 1628 1629 1629 while (mptcp_send_head(sk) && (push_count > 0)) { ··· 1665 1665 push_count--; 1666 1666 continue; 1667 1667 } 1668 - do_check_data_fin = true; 1668 + copied = true; 1669 1669 } 1670 1670 } 1671 1671 } ··· 1674 1674 if (ssk) 1675 1675 mptcp_push_release(ssk, &info); 1676 1676 1677 - /* ensure the rtx timer is running */ 1678 - if (!mptcp_rtx_timer_pending(sk)) 1679 - mptcp_reset_rtx_timer(sk); 1680 - if (do_check_data_fin) 1677 + /* Avoid scheduling the rtx timer if no data has been pushed; the timer 1678 + * will be updated on positive acks by __mptcp_cleanup_una(). 1679 + */ 1680 + if (copied) { 1681 + if (!mptcp_rtx_timer_pending(sk)) 1682 + mptcp_reset_rtx_timer(sk); 1681 1683 mptcp_check_send_data_fin(sk); 1684 + } 1682 1685 } 1683 1686 1684 1687 static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first) ··· 2769 2766 2770 2767 /* 2771 2768 * make the whole retrans decision, xmit, disallow 2772 - * fallback atomic 2769 + * fallback atomic, note that we can't retrans even 2770 + * when an infinite fallback is in progress, i.e. new 2771 + * subflows are disallowed. 2773 2772 */ 2774 2773 spin_lock_bh(&msk->fallback_lock); 2775 - if (__mptcp_check_fallback(msk)) { 2774 + if (__mptcp_check_fallback(msk) || 2775 + !msk->allow_subflows) { 2776 2776 spin_unlock_bh(&msk->fallback_lock); 2777 2777 release_sock(ssk); 2778 2778 goto clear_scheduled;
+4
tools/testing/selftests/net/mptcp/pm_netlink.sh
··· 192 192 flush_endpoint 193 193 check "show_endpoints" "" "flush addrs" 194 194 195 + add_endpoint 10.0.1.1 flags unknown 196 + check "show_endpoints" "$(format_endpoints "1,10.0.1.1")" "ignore unknown flags" 197 + flush_endpoint 198 + 195 199 set_limits 9 1 2>/dev/null 196 200 check "get_limits" "${default_limits}" "rcv addrs above hard limit" 197 201
+11
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
··· 24 24 #define IPPROTO_MPTCP 262 25 25 #endif 26 26 27 + #define MPTCP_PM_ADDR_FLAG_UNKNOWN _BITUL(7) 28 + 27 29 static void syntax(char *argv[]) 28 30 { 29 31 fprintf(stderr, "%s add|ann|rem|csf|dsf|get|set|del|flush|dump|events|listen|accept [<args>]\n", argv[0]); ··· 838 836 flags |= MPTCP_PM_ADDR_FLAG_BACKUP; 839 837 else if (!strcmp(tok, "fullmesh")) 840 838 flags |= MPTCP_PM_ADDR_FLAG_FULLMESH; 839 + else if (!strcmp(tok, "unknown")) 840 + flags |= MPTCP_PM_ADDR_FLAG_UNKNOWN; 841 841 else 842 842 error(1, errno, 843 843 "unknown flag %s", argv[arg]); ··· 1048 1044 if (flags & MPTCP_PM_ADDR_FLAG_IMPLICIT) { 1049 1045 printf("implicit"); 1050 1046 flags &= ~MPTCP_PM_ADDR_FLAG_IMPLICIT; 1047 + if (flags) 1048 + printf(","); 1049 + } 1050 + 1051 + if (flags & MPTCP_PM_ADDR_FLAG_UNKNOWN) { 1052 + printf("unknown"); 1053 + flags &= ~MPTCP_PM_ADDR_FLAG_UNKNOWN; 1051 1054 if (flags) 1052 1055 printf(","); 1053 1056 }