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.

mptcp: update rtx timeout only if required.

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>
Link: https://lore.kernel.org/r/1a72039f112cae048c44d398ffa14e0a1432db3d.1605737083.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Paolo Abeni and committed by
Jakub Kicinski
b680a214 ac75b096

+5 -4
+5 -4
net/mptcp/protocol.c
··· 1261 1261 mptcp_push_release(sk, ssk, &info); 1262 1262 1263 1263 out: 1264 - /* start the timer, if it's not pending */ 1265 - if (!mptcp_timer_pending(sk)) 1266 - mptcp_reset_timer(sk); 1267 - if (copied) 1264 + if (copied) { 1265 + /* start the timer, if it's not pending */ 1266 + if (!mptcp_timer_pending(sk)) 1267 + mptcp_reset_timer(sk); 1268 1268 __mptcp_check_send_data_fin(sk); 1269 + } 1269 1270 } 1270 1271 1271 1272 static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)