Skip to content

Commit e2558de

Browse files
committed
tgupdate: merge t/DO-NOT-MERGE-mptcp-use-kmalloc-on-kasan-build into t/DO-NOT-MERGE-mptcp-enabled-by-default base
2 parents dee171d + d97ba2b commit e2558de

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

net/mptcp/protocol.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
16261626
struct mptcp_sendmsg_info info = {
16271627
.flags = flags,
16281628
};
1629-
bool do_check_data_fin = false;
1629+
bool copied = false;
16301630
int push_count = 1;
16311631

16321632
while (mptcp_send_head(sk) && (push_count > 0)) {
@@ -1668,7 +1668,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
16681668
push_count--;
16691669
continue;
16701670
}
1671-
do_check_data_fin = true;
1671+
copied = true;
16721672
}
16731673
}
16741674
}
@@ -1677,11 +1677,14 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
16771677
if (ssk)
16781678
mptcp_push_release(ssk, &info);
16791679

1680-
/* ensure the rtx timer is running */
1681-
if (!mptcp_rtx_timer_pending(sk))
1682-
mptcp_reset_rtx_timer(sk);
1683-
if (do_check_data_fin)
1680+
/* Avoid scheduling the rtx timer if no data has been pushed; the timer
1681+
* will be updated on positive acks by __mptcp_cleanup_una().
1682+
*/
1683+
if (copied) {
1684+
if (!mptcp_rtx_timer_pending(sk))
1685+
mptcp_reset_rtx_timer(sk);
16841686
mptcp_check_send_data_fin(sk);
1687+
}
16851688
}
16861689

16871690
static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first)

0 commit comments

Comments
 (0)