From: Yingjie Wang <x-professor@outlook.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "mptcp@lists.linux.dev" <mptcp@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"skhan@linuxfoundation.org" <skhan@linuxfoundation.org>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"edumazet@kernel.org" <edumazet@kernel.org>,
"ncardwell@google.com" <ncardwell@google.com>,
"gang.yan@linux.dev" <gang.yan@linux.dev>,
"kuniyu@google.com" <kuniyu@google.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"matttbe@kernel.org" <matttbe@kernel.org>,
"martineau@kernel.org" <martineau@kernel.org>,
"geliang@kernel.org" <geliang@kernel.org>,
"ycheng@google.com" <ycheng@google.com>,
"weiwan@google.com" <weiwan@google.com>
Subject: [PATCH net-next v3 3/3] mptcp: limit blackhole_timeout to one day
Date: Mon, 16 Nov 2026 16:46:46 +0000 [thread overview]
Message-ID: <568bf901e401ab7186ba2af8fabdaeb6cadfd800.1794847474.git.x-professor@outlook.com> (raw)
In-Reply-To: <cover.1794847474.git.x-professor@outlook.com>
net.mptcp.blackhole_timeout accepts any non-negative int as the initial
period for disabling active MPTCP after a blackhole, and the period can
then grow 64-fold. A multi-day initial period is not useful, and on
32-bit kernels, values above about 1,073,741 seconds at HZ=1000 are
shortened by the MAX_JIFFY_OFFSET cap even on the first blackhole.
Limit the writable value to one day, matching
net.ipv4.tcp_fastopen_blackhole_timeout_sec, and document the limit. The
default of 3600 seconds is unchanged.
Writes above 86400 seconds, which were previously accepted, now fail
with -EINVAL and leave the current value unchanged.
Suggested-by: Eric Dumazet <edumazet@kernel.org>
Signed-off-by: Yingjie Wang <x-professor@outlook.com>
---
Documentation/networking/mptcp-sysctl.rst | 1 +
net/mptcp/ctrl.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/Documentation/networking/mptcp-sysctl.rst b/Documentation/networking/mptcp-sysctl.rst
index b9b5f58e0625..ca00253c8ae9 100644
--- a/Documentation/networking/mptcp-sysctl.rst
+++ b/Documentation/networking/mptcp-sysctl.rst
@@ -63,6 +63,7 @@ blackhole_timeout - INTEGER (seconds)
blackhole issue goes away.
0 to disable the blackhole detection. This is a per-namespace sysctl.
+ The maximum value is one day (86400 seconds).
Default: 3600
diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c
index 0b10e94e7f43..1f167f72c1f5 100644
--- a/net/mptcp/ctrl.c
+++ b/net/mptcp/ctrl.c
@@ -20,6 +20,7 @@ static int mptcp_pernet_id;
#ifdef CONFIG_SYSCTL
static int mptcp_pm_type_max = __MPTCP_PM_TYPE_MAX;
+static int mptcp_blackhole_timeout_max = 24 * 3600;
#endif
struct mptcp_pernet {
@@ -350,6 +351,7 @@ static struct ctl_table mptcp_sysctl_table[] = {
.mode = 0644,
.proc_handler = proc_blackhole_detect_timeout,
.extra1 = SYSCTL_ZERO,
+ .extra2 = &mptcp_blackhole_timeout_max,
},
{
.procname = "syn_retrans_before_tcp_fallback",
--
2.43.0
prev parent reply other threads:[~2026-11-16 16:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 16:46 [PATCH net-next v3 0/3] tcp/mptcp: prevent blackhole timeout arithmetic wraparound Yingjie Wang
2026-11-16 16:46 ` [PATCH net-next v3 1/3] tcp: avoid wrapping Fast Open blackhole timeout Yingjie Wang
2026-11-16 16:46 ` [PATCH net-next v3 2/3] mptcp: avoid wrapping " Yingjie Wang
2026-11-16 16:46 ` Yingjie Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=568bf901e401ab7186ba2af8fabdaeb6cadfd800.1794847474.git.x-professor@outlook.com \
--to=x-professor@outlook.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gang.yan@linux.dev \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=weiwan@google.com \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®