2022-08-01 12:43:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.18 72/88] mptcp: dont send RST for single subflow

From: Geliang Tang <[email protected]>

[ Upstream commit 1761fed2567807f26fbd53032ff622f55978c7a9 ]

When a bad checksum is detected and a single subflow is in use, don't
send RST + MP_FAIL, send data_ack + MP_FAIL instead.

So invoke tcp_send_active_reset() only when mptcp_has_another_subflow()
is true.

Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
net/mptcp/subflow.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 7919e259175d..ccae50eba664 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1221,14 +1221,14 @@ static bool subflow_check_data_avail(struct sock *ssk)
/* RFC 8684 section 3.7. */
if (subflow->send_mp_fail) {
if (mptcp_has_another_subflow(ssk)) {
+ ssk->sk_err = EBADMSG;
+ tcp_set_state(ssk, TCP_CLOSE);
+ subflow->reset_transient = 0;
+ subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
+ tcp_send_active_reset(ssk, GFP_ATOMIC);
while ((skb = skb_peek(&ssk->sk_receive_queue)))
sk_eat_skb(ssk, skb);
}
- ssk->sk_err = EBADMSG;
- tcp_set_state(ssk, TCP_CLOSE);
- subflow->reset_transient = 0;
- subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
- tcp_send_active_reset(ssk, GFP_ATOMIC);
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
return true;
}
--
2.35.1





2022-08-02 21:18:57

by Mat Martineau

[permalink] [raw]
Subject: Re: [PATCH 5.18 72/88] mptcp: dont send RST for single subflow

On Mon, 1 Aug 2022, Greg Kroah-Hartman wrote:

> From: Geliang Tang <[email protected]>
>
> [ Upstream commit 1761fed2567807f26fbd53032ff622f55978c7a9 ]
>
> When a bad checksum is detected and a single subflow is in use, don't
> send RST + MP_FAIL, send data_ack + MP_FAIL instead.
>
> So invoke tcp_send_active_reset() only when mptcp_has_another_subflow()
> is true.
>
> Signed-off-by: Geliang Tang <[email protected]>
> Signed-off-by: Mat Martineau <[email protected]>
> Signed-off-by: David S. Miller <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>

Hi Greg -

Please drop this patch from the 5.18-stable queue. It was the first of an
8-patch series and doesn't really stand alone.

This commit message lacks the Fixes: tag and the magic commit message
words that I've seen the scripts pick up, so I'm curious: was this patch
selected by hand?


Thanks,

Mat


> ---
> net/mptcp/subflow.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
> index 7919e259175d..ccae50eba664 100644
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -1221,14 +1221,14 @@ static bool subflow_check_data_avail(struct sock *ssk)
> /* RFC 8684 section 3.7. */
> if (subflow->send_mp_fail) {
> if (mptcp_has_another_subflow(ssk)) {
> + ssk->sk_err = EBADMSG;
> + tcp_set_state(ssk, TCP_CLOSE);
> + subflow->reset_transient = 0;
> + subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
> + tcp_send_active_reset(ssk, GFP_ATOMIC);
> while ((skb = skb_peek(&ssk->sk_receive_queue)))
> sk_eat_skb(ssk, skb);
> }
> - ssk->sk_err = EBADMSG;
> - tcp_set_state(ssk, TCP_CLOSE);
> - subflow->reset_transient = 0;
> - subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
> - tcp_send_active_reset(ssk, GFP_ATOMIC);
> WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_NODATA);
> return true;
> }
> --
> 2.35.1
>
>
>
>

--
Mat Martineau
Intel

2022-08-02 21:24:33

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH 5.18 72/88] mptcp: dont send RST for single subflow

On Tue, Aug 02, 2022 at 01:52:15PM -0700, Mat Martineau wrote:
>On Mon, 1 Aug 2022, Greg Kroah-Hartman wrote:
>
>>From: Geliang Tang <[email protected]>
>>
>>[ Upstream commit 1761fed2567807f26fbd53032ff622f55978c7a9 ]
>>
>>When a bad checksum is detected and a single subflow is in use, don't
>>send RST + MP_FAIL, send data_ack + MP_FAIL instead.
>>
>>So invoke tcp_send_active_reset() only when mptcp_has_another_subflow()
>>is true.
>>
>>Signed-off-by: Geliang Tang <[email protected]>
>>Signed-off-by: Mat Martineau <[email protected]>
>>Signed-off-by: David S. Miller <[email protected]>
>>Signed-off-by: Sasha Levin <[email protected]>
>
>Hi Greg -
>
>Please drop this patch from the 5.18-stable queue. It was the first of
>an 8-patch series and doesn't really stand alone.
>
>This commit message lacks the Fixes: tag and the magic commit message
>words that I've seen the scripts pick up, so I'm curious: was this
>patch selected by hand?

Yup, between the commit message and the code itself, it looked like a
fix for AUTOSEL.

--
Thanks,
Sasha

2022-08-03 07:02:53

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 5.18 72/88] mptcp: dont send RST for single subflow

On Tue, Aug 02, 2022 at 05:21:04PM -0400, Sasha Levin wrote:
> On Tue, Aug 02, 2022 at 01:52:15PM -0700, Mat Martineau wrote:
> > On Mon, 1 Aug 2022, Greg Kroah-Hartman wrote:
> >
> > > From: Geliang Tang <[email protected]>
> > >
> > > [ Upstream commit 1761fed2567807f26fbd53032ff622f55978c7a9 ]
> > >
> > > When a bad checksum is detected and a single subflow is in use, don't
> > > send RST + MP_FAIL, send data_ack + MP_FAIL instead.
> > >
> > > So invoke tcp_send_active_reset() only when mptcp_has_another_subflow()
> > > is true.
> > >
> > > Signed-off-by: Geliang Tang <[email protected]>
> > > Signed-off-by: Mat Martineau <[email protected]>
> > > Signed-off-by: David S. Miller <[email protected]>
> > > Signed-off-by: Sasha Levin <[email protected]>
> >
> > Hi Greg -
> >
> > Please drop this patch from the 5.18-stable queue. It was the first of
> > an 8-patch series and doesn't really stand alone.
> >
> > This commit message lacks the Fixes: tag and the magic commit message
> > words that I've seen the scripts pick up, so I'm curious: was this patch
> > selected by hand?
>
> Yup, between the commit message and the code itself, it looked like a
> fix for AUTOSEL.

Ok, now dropped, thanks for the review.

greg k-h