* [PATCH net-next] mptcp: update rtx timeout only if required.
@ 2020-11-18 22:05 Paolo Abeni
2020-11-19 0:42 ` [MPTCP] " Mat Martineau
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Abeni @ 2020-11-18 22:05 UTC (permalink / raw)
To: netdev; +Cc: Jakub Kicinski, mptcp
We must start the retransmission timer only there are
pending data in the rtx queue.
Otherwise we can hit a WARN_ON in mptcp_reset_timer(),
as syzbot demonstrated.
Reported-and-tested-by: syzbot+42aa53dafb66a07e5a24@syzkaller.appspotmail.com
Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/mptcp/protocol.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 8df013daea88..aeda4357de9a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1261,11 +1261,12 @@ static void mptcp_push_pending(struct sock *sk, unsigned int flags)
mptcp_push_release(sk, ssk, &info);
out:
- /* start the timer, if it's not pending */
- if (!mptcp_timer_pending(sk))
- mptcp_reset_timer(sk);
- if (copied)
+ if (copied) {
+ /* start the timer, if it's not pending */
+ if (!mptcp_timer_pending(sk))
+ mptcp_reset_timer(sk);
__mptcp_check_send_data_fin(sk);
+ }
}
static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [MPTCP] [PATCH net-next] mptcp: update rtx timeout only if required.
2020-11-18 22:05 [PATCH net-next] mptcp: update rtx timeout only if required Paolo Abeni
@ 2020-11-19 0:42 ` Mat Martineau
2020-11-19 14:19 ` Naresh Kamboju
0 siblings, 1 reply; 4+ messages in thread
From: Mat Martineau @ 2020-11-19 0:42 UTC (permalink / raw)
To: Paolo Abeni; +Cc: netdev, Jakub Kicinski, mptcp
On Wed, 18 Nov 2020, Paolo Abeni wrote:
> We must start the retransmission timer only there are
> pending data in the rtx queue.
> Otherwise we can hit a WARN_ON in mptcp_reset_timer(),
> as syzbot demonstrated.
>
> Reported-and-tested-by: syzbot+42aa53dafb66a07e5a24@syzkaller.appspotmail.com
> Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/mptcp/protocol.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [MPTCP] [PATCH net-next] mptcp: update rtx timeout only if required.
2020-11-19 0:42 ` [MPTCP] " Mat Martineau
@ 2020-11-19 14:19 ` Naresh Kamboju
2020-11-20 5:55 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2020-11-19 14:19 UTC (permalink / raw)
To: Mat Martineau; +Cc: Paolo Abeni, Netdev, Jakub Kicinski, mptcp
On Thu, 19 Nov 2020 at 06:13, Mat Martineau
<mathew.j.martineau@linux.intel.com> wrote:
>
>
> On Wed, 18 Nov 2020, Paolo Abeni wrote:
>
> > We must start the retransmission timer only there are
> > pending data in the rtx queue.
> > Otherwise we can hit a WARN_ON in mptcp_reset_timer(),
> > as syzbot demonstrated.
> >
> > Reported-and-tested-by: syzbot+42aa53dafb66a07e5a24@syzkaller.appspotmail.com
> > Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()")
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> > net/mptcp/protocol.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
>
> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
The reported kernel warning was fixed after applying this fix on top of
Linux next tag 20201119.
- Naresh
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [MPTCP] [PATCH net-next] mptcp: update rtx timeout only if required.
2020-11-19 14:19 ` Naresh Kamboju
@ 2020-11-20 5:55 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-11-20 5:55 UTC (permalink / raw)
To: Naresh Kamboju; +Cc: Mat Martineau, Paolo Abeni, Netdev, mptcp
On Thu, 19 Nov 2020 19:49:16 +0530 Naresh Kamboju wrote:
> > > We must start the retransmission timer only there are
> > > pending data in the rtx queue.
> > > Otherwise we can hit a WARN_ON in mptcp_reset_timer(),
> > > as syzbot demonstrated.
> > >
> > > Reported-and-tested-by: syzbot+42aa53dafb66a07e5a24@syzkaller.appspotmail.com
> > > Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()")
> > > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> >
> > Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-20 5:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18 22:05 [PATCH net-next] mptcp: update rtx timeout only if required Paolo Abeni
2020-11-19 0:42 ` [MPTCP] " Mat Martineau
2020-11-19 14:19 ` Naresh Kamboju
2020-11-20 5:55 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).