FAILED: patch "[PATCH] mptcp: fix missing wakeup" failed to apply to 5.11-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.11-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 417789df4a03bc820b082bcc503f0d4c5e4704b9 Mon Sep 17 00:00:00 2001
From: Paolo Abeni <[email protected]>
Date: Thu, 4 Mar 2021 13:32:15 -0800
Subject: [PATCH] mptcp: fix missing wakeup
__mptcp_clean_una() can free write memory and should wake-up user-space processes when needed.
When such function is invoked by the MPTCP receive path, the wakeup is not needed, as the TCP stack will later trigger subflow_write_space which will do the wakeup as needed.
Other __mptcp_clean_una() call sites need an additional wakeup check Let's bundle the relevant code in a new helper and use it.
net/mptcp/protocol.c +8 -2
@@ -1061,6 +1061,12 @@ static void __mptcp_clean_una(struct sock *sk) } } +static void __mptcp_clean_una_wakeup (struct sock *sk) +{ +__mptcp_clean_una (sk); +mptcp_write_space (sk); +} +static void mptcp_enter_memory_pressure (struct sock *sk) {struct mptcp_subflow_context *subflow;
@@ -2270,7 +2276,7 @@ static void __mptcp_retrans(struct sock *sk)struct sock *ssk;int ret; -__mptcp_clean_una (sk); +__mptcp_clean_una_wakeup (sk); dfrag =mptcp_rtx_head (sk);if (!dfrag)return ;
@@ -2983,7 +2989,7 @@ static void mptcp_release_cb(struct sock *sk) }if (test_and_clear_bit (MPTCP_CLEAN_UNA , &mptcp_sk (sk)->flags)) -__mptcp_clean_una (sk); +__mptcp_clean_una_wakeup (sk);if (test_and_clear_bit (MPTCP_ERROR_REPORT , &mptcp_sk (sk)->flags))__mptcp_error_report (sk);