@@ -1444,8 +1444,7 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
trace_mptcp_subflow_get_send(subflow);
ssk = mptcp_subflow_tcp_sock(subflow);
- if (!mptcp_subflow_active(subflow) ||
- !sk_stream_memory_free(ssk))
+ if (!mptcp_subflow_active(subflow))
continue;
tout = max(tout, mptcp_timeout_from_subflow(subflow));
@@ -1461,6 +1460,8 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
linger_time = div_u64((u64)READ_ONCE(ssk->sk_wmem_queued) << 32, pace);
if (linger_time < send_info[backup].linger_time) {
+ if (!sk_stream_memory_free(ssk))
+ continue;
send_info[backup].ssk = ssk;
send_info[backup].linger_time = linger_time;
}