diff options
| author | Paolo Abeni <[email protected]> | 2023-04-11 20:42:09 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-04-13 16:58:55 +0000 |
| commit | a5cb752b125766524c921faab1a45cc96065b0a7 (patch) | |
| tree | 6f9fd2b692c99934f2712ad5f12a19c9eb330985 /net/mptcp/options.c | |
| parent | net: enetc: workaround for unresponsive pMAC after receiving express traffic (diff) | |
| download | kernel-a5cb752b125766524c921faab1a45cc96065b0a7.tar.gz kernel-a5cb752b125766524c921faab1a45cc96065b0a7.zip | |
mptcp: use mptcp_schedule_work instead of open-coding it
Beyond reducing code duplication this also avoids scheduling
the mptcp_worker on a closed socket on some edge scenarios.
The addressed issue is actually older than the blamed commit
below, but this fix needs it as a pre-requisite.
Fixes: ba8f48f7a4d7 ("mptcp: introduce mptcp_schedule_work")
Cc: [email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/mptcp/options.c')
| -rw-r--r-- | net/mptcp/options.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c index b30cea2fbf3f..355f798d575a 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1192,9 +1192,8 @@ bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb) */ if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) { if (mp_opt.data_fin && mp_opt.data_len == 1 && - mptcp_update_rcv_data_fin(msk, mp_opt.data_seq, mp_opt.dsn64) && - schedule_work(&msk->work)) - sock_hold(subflow->conn); + mptcp_update_rcv_data_fin(msk, mp_opt.data_seq, mp_opt.dsn64)) + mptcp_schedule_work((struct sock *)msk); return true; } |
