From patchwork Thu Feb 8 18:03:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550246 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 191377EF0C; Thu, 8 Feb 2024 18:04:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415467; cv=none; b=WYkh4tyLmxkaE3vpQ+xgJMvfNrQR4cSRy5aT6UANiLfbXz194yBqLhbgB9XzyU/J5/35xJJi/t3xudJQHfmu1/6I6LWHS/c59Ua30gsmERe/b0fC/JVxI+vIYMqH78f8BWWm/UxxJvq17rEVUiDAtDUQHu6752Ql19eddF09GMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415467; c=relaxed/simple; bh=aCkDCXwukiBM5j5kejbQN2B8zljH82fF79qIsFgXzX4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZDy1Uum7HY7B0qPTVjhBEJ+yiDJiHczWh/m1eYVfTtokP2y2lLBS/fEGjuf4ksO5DYGPArO6FgHWVnxKJT0S5+2hYi8q1h1ptEomtGE6ACsoBOBTNAFEvgZCzQOPHy/je4GbGvoITFQ5OimgSbQNvYRElbNc1afDdsR0OOOaPvc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pjY24xFu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pjY24xFu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58F27C43399; Thu, 8 Feb 2024 18:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415465; bh=aCkDCXwukiBM5j5kejbQN2B8zljH82fF79qIsFgXzX4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pjY24xFu5QFgFKifBfG38/ntMpu0Ur8UUbSe1VEC8CHTfbHrdhmAMNErDKuCPSCKS APOTtShusS/XEmzKA8L1HVZJ63di5hFgd87KBrHRTKFgGWnICywPOcD8LMWN82v1SG zcnuIwK/CLql/2N2zcAEgRdT38Z96hxJNkqKj33xf/OK1SIO7/b/2aYcHb+L8BQGPz Lt5mU/11n/rKaXxf559r2us+mLxvlytjfEt0AiAibT6AL/x1H0WgIMC+760+lBk2xT xW0bfXPqT8VwhaSDd4bac6qfzURqd2bxZpPZb0FG9J8Vxy2bqiGycwz3GgW9y0BHAB 528p1DvrtJqNQ== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:49 +0100 Subject: [PATCH net 1/7] mptcp: drop the push_pending field Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-1-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2836; i=matttbe@kernel.org; h=from:subject:message-id; bh=HEDW7t9+sgzNCTV35HeaMf5YyIAJ9ktNnQ5iSir6dlM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxRehSt3z1Z3KCCwjZLMPz6FGmixn5dnhvqtlU zvLUCOt2+6JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXoQAKCRD2t4JPQmmg c0/HEADl4pEhwaSENKVzRBXH7QSm67bmWcAFJhCjxhkHieOzw4l5UJctY7QkbO/ybGekG9AUzEw fRCb13mCzt795fiGeWBgSNx65swXRnkD4M/UvAMsDRDaxZPUi79NHBpEUqipCav+aFygp8iEdTm wmZrfWFQjP3NZVRlU77RJbH5LMk8BUwT1xzSHFBaY54im9o8XBmnujHZfDglWLVNbtv4WbjRn4/ 9lR5lZhEt4iZom8J7GpS9UEx8Sg4eMDrImHxYUCLHV7YkcUEkeoX1duFsNBb1gtyBFm0+sSyvNt s+zrGY708M4yteyrNCJdNNnodh02DCtoCvPMRYDNDY+PMbEcp+FqFBPvH7BA0ZAGO6COijp+W8i p1AqZI0fi+Txj5BN1pylGsxc080z9M9Fx1FeEhEWRbaqsQulCJ2M+V81nQYuXyiOpXHu0ZaF8et IaJjfqxoCZhYKZbaEsrO/isNKLJji0HlXiHvGAQzj/8kvjY3l4K0sUIcJTvYzSOO7I8pfpnoA6m gZ8fNiin9+1B3ZIkiNzPHFTtMQ89daStKGqUbzuPDrPQkOjlEc2OltAp3nU7zKlaJEhw5wxkmNx loj/ETz1jTzDrKMicuYM4Gahxsh8csazEdqrEwZqYdXERZDJylzkpQyCq9AKEgb1F8iDmUUsTgw 8gZ+RuHJ6yvaVTg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Paolo Abeni Such field is there to avoid acquiring the data lock in a few spots, but it adds complexity to the already non trivial locking schema. All the relevant call sites (mptcp-level re-injection, set socket options), are slow-path, drop such field in favor of 'cb_flags', adding the relevant locking. This patch could be seen as an improvement, instead of a fix. But it simplifies the next patch. The 'Fixes' tag has been added to help having this series backported to stable. Fixes: e9d09baca676 ("mptcp: avoid atomic bit manipulation when possible") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/protocol.c | 12 ++++++------ net/mptcp/protocol.h | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 028e8b473626..2111819016af 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1505,8 +1505,11 @@ static void mptcp_update_post_push(struct mptcp_sock *msk, void mptcp_check_and_set_pending(struct sock *sk) { - if (mptcp_send_head(sk)) - mptcp_sk(sk)->push_pending |= BIT(MPTCP_PUSH_PENDING); + if (mptcp_send_head(sk)) { + mptcp_data_lock(sk); + mptcp_sk(sk)->cb_flags |= BIT(MPTCP_PUSH_PENDING); + mptcp_data_unlock(sk); + } } static int __subflow_push_pending(struct sock *sk, struct sock *ssk, @@ -3142,7 +3145,6 @@ static int mptcp_disconnect(struct sock *sk, int flags) mptcp_destroy_common(msk, MPTCP_CF_FASTCLOSE); WRITE_ONCE(msk->flags, 0); msk->cb_flags = 0; - msk->push_pending = 0; msk->recovery = false; msk->can_ack = false; msk->fully_established = false; @@ -3330,8 +3332,7 @@ static void mptcp_release_cb(struct sock *sk) struct mptcp_sock *msk = mptcp_sk(sk); for (;;) { - unsigned long flags = (msk->cb_flags & MPTCP_FLAGS_PROCESS_CTX_NEED) | - msk->push_pending; + unsigned long flags = (msk->cb_flags & MPTCP_FLAGS_PROCESS_CTX_NEED); struct list_head join_list; if (!flags) @@ -3347,7 +3348,6 @@ static void mptcp_release_cb(struct sock *sk) * datapath acquires the msk socket spinlock while helding * the subflow socket lock */ - msk->push_pending = 0; msk->cb_flags &= ~flags; spin_unlock_bh(&sk->sk_lock.slock); diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 3517f2d24a22..b905f1868298 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -286,7 +286,6 @@ struct mptcp_sock { int rmem_released; unsigned long flags; unsigned long cb_flags; - unsigned long push_pending; bool recovery; /* closing subflow write queue reinjected */ bool can_ack; bool fully_established; From patchwork Thu Feb 8 18:03:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550247 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECA5B86AF2; Thu, 8 Feb 2024 18:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415470; cv=none; b=CnTImYcMA611CxzsuVjnnQukd31Lu/IjMR1VKDPV7ghVJMvHVns6h1Ix6PDtqfP1k0fUp8LOdiXjymOG0hpxyY8T0RmbwYBdDuyJacvezJxOa6McTyFDbj5WvJDglAMwKx3WRxGeAMB35Y3UaE/d4R+B0S6CqOqBsov6AqOFL3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415470; c=relaxed/simple; bh=EOoPTeNnER7i43iXou7ntTSk1e6l39fVUtsHySrh3Fo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sxCD8k/sE7AIzjrxu2JJYw8uyooKNO78UfQfmixD8U6Agr1nOLzr3Th3omF/hSg4961T3xacMd7SNsZRF5khdFyWfl2VWHJaFCnD3IUijP4tw2ZpvVPtHeF+tvRKdPd/Tq5hNR2/h5G34GthWdD0Qn8FPMBcJeDeDNDxrXIEQHk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l1F8eMVe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l1F8eMVe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EAFDC433B1; Thu, 8 Feb 2024 18:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415469; bh=EOoPTeNnER7i43iXou7ntTSk1e6l39fVUtsHySrh3Fo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=l1F8eMVeUYOlgnfTDTMEH1O2giWk7wFtGNmQdlYAymbpn9WE713UNZY8ljtaxMjjS FKQn+8/jsAIsSY+fq2sDx/IA6jwML3ajY2x2KonSUaaRdM8jGMoMM0y2mn7b+p9zP3 cPmeHIDp6C1p6h4crEa9FhoiYIixn9bdv+2ADhS0fmEoTYZhh7Y/qXxYgPKwI+4ho3 v574ndktvL0G8hAS92XEMyq1ahMNWupijfzJ44Z072/R4s/9kpr+uHQcCwXH9fSXIB iqKRcrCEvG8SE+vF0G+ULFmFi0/zEUGL5wvkKell8FnWunudNqm8TdjYeWk/T7F7II 63PiboTeUjHCA== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:50 +0100 Subject: [PATCH net 2/7] mptcp: fix rcv space initialization Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-2-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4231; i=matttbe@kernel.org; h=from:subject:message-id; bh=u459/uEWds6unUKdxrBRK9kc4LzzOSdfJrTQrb3+BUo=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxReh66G8XYWqiDsnrvH7A+T0+wCScbecigzt8 f6bvzZYXauJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXoQAKCRD2t4JPQmmg c8ZHD/9fQ9GFtFA+opHpLjjxDQhx+9qRdYgaO/d07oA3asjxIH0a7bEW3hF3T8zW2GchvdYjPew lln3UQvrNrZitHWpfXiBSmEyWQSzo3+027w0wqiCOUH/mMKDv6zHVaUMNatzrd/uxRqC1KLhbbD NTEn3f16j3uo6N0v5MdK2R+4t7C1OOYyBASNbfna+P5Tx2MKTXd2kbcOUtvMhT72g03a2Vfm2F8 oB9Vt5Jp5FtzKvQrGqnUjwG1ahwoQW53U48l1bILHICl72xYWtfWyVdaV8GEgO42FPEp5TSAE8g sssrhYT5z5T3eMCK81q27+Nflr0YDS3dyvWx1NeZLUpJajbBqznDUoBT1mOZ+BULayyHue6S9MT 0MzC+CvYZ33QC9zq3E9UrmYdsdM1DSU/cPEsm6ZA3t8/eo6fqHp0P7s9CZhprP/1h5jPCoWvb/k pH+pty8cLODZbhAMAgeBB98/6ytSuBIxvZ3AgSkyEQYEtKxDQ4m00y2xpx0VD5FO8y//cp2Kw+D tofIUHbqHyMVvO714CXGvZ1187d9zR9BjGrVSxNzppMwVwCb+X1VQ5jIQUUcONjv2FeN6ztwj4x H3BuCbO4VvsWvamW1U62Pzwg620fUXs4ZBTmw0Js67Zcjzgp5z23IsHsWg0dGKVF3frYOuc9cbB 1vs8YAOhSNXFVZQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Paolo Abeni mptcp_rcv_space_init() is supposed to happen under the msk socket lock, but active msk socket does that without such protection. Leverage the existing mptcp_propagate_state() helper to that extent. We need to ensure mptcp_rcv_space_init will happen before mptcp_rcv_space_adjust(), and the release_cb does not assure that: explicitly check for such condition. While at it, move the wnd_end initialization out of mptcp_rcv_space_init(), it never belonged there. Note that the race does not produce ill effect in practice, but change allows cleaning-up and defying better the locking model. Fixes: a6b118febbab ("mptcp: add receive buffer auto-tuning") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/protocol.c | 10 ++++++---- net/mptcp/protocol.h | 3 ++- net/mptcp/subflow.c | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 2111819016af..7632eafb683b 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1963,6 +1963,9 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied) if (copied <= 0) return; + if (!msk->rcvspace_init) + mptcp_rcv_space_init(msk, msk->first); + msk->rcvq_space.copied += copied; mstamp = div_u64(tcp_clock_ns(), NSEC_PER_USEC); @@ -3160,6 +3163,7 @@ static int mptcp_disconnect(struct sock *sk, int flags) msk->bytes_received = 0; msk->bytes_sent = 0; msk->bytes_retrans = 0; + msk->rcvspace_init = 0; WRITE_ONCE(sk->sk_shutdown, 0); sk_error_report(sk); @@ -3247,6 +3251,7 @@ void mptcp_rcv_space_init(struct mptcp_sock *msk, const struct sock *ssk) { const struct tcp_sock *tp = tcp_sk(ssk); + msk->rcvspace_init = 1; msk->rcvq_space.copied = 0; msk->rcvq_space.rtt_us = 0; @@ -3257,8 +3262,6 @@ void mptcp_rcv_space_init(struct mptcp_sock *msk, const struct sock *ssk) TCP_INIT_CWND * tp->advmss); if (msk->rcvq_space.space == 0) msk->rcvq_space.space = TCP_INIT_CWND * TCP_MSS_DEFAULT; - - WRITE_ONCE(msk->wnd_end, msk->snd_nxt + tcp_sk(ssk)->snd_wnd); } void mptcp_destroy_common(struct mptcp_sock *msk, unsigned int flags) @@ -3478,10 +3481,9 @@ void mptcp_finish_connect(struct sock *ssk) WRITE_ONCE(msk->write_seq, subflow->idsn + 1); WRITE_ONCE(msk->snd_nxt, msk->write_seq); WRITE_ONCE(msk->snd_una, msk->write_seq); + WRITE_ONCE(msk->wnd_end, msk->snd_nxt + tcp_sk(ssk)->snd_wnd); mptcp_pm_new_connection(msk, ssk, 0); - - mptcp_rcv_space_init(msk, ssk); } void mptcp_sock_graft(struct sock *sk, struct socket *parent) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index b905f1868298..9f5ee82e3473 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -304,7 +304,8 @@ struct mptcp_sock { nodelay:1, fastopening:1, in_accept_queue:1, - free_first:1; + free_first:1, + rcvspace_init:1; struct work_struct work; struct sk_buff *ooo_last_skb; struct rb_root out_of_order_queue; diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 0dcb721c89d1..56b2ac2f2f22 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -424,6 +424,8 @@ void __mptcp_sync_state(struct sock *sk, int state) struct mptcp_sock *msk = mptcp_sk(sk); __mptcp_propagate_sndbuf(sk, msk->first); + if (!msk->rcvspace_init) + mptcp_rcv_space_init(msk, msk->first); if (sk->sk_state == TCP_SYN_SENT) { mptcp_set_state(sk, state); sk->sk_state_change(sk); @@ -545,7 +547,6 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) } } else if (mptcp_check_fallback(sk)) { fallback: - mptcp_rcv_space_init(msk, sk); mptcp_propagate_state(parent, sk); } return; @@ -1744,7 +1745,6 @@ static void subflow_state_change(struct sock *sk) msk = mptcp_sk(parent); if (subflow_simultaneous_connect(sk)) { mptcp_do_fallback(sk); - mptcp_rcv_space_init(msk, sk); pr_fallback(msk); subflow->conn_finished = 1; mptcp_propagate_state(parent, sk); From patchwork Thu Feb 8 18:03:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550248 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C26AA1272D0; Thu, 8 Feb 2024 18:04:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415473; cv=none; b=DFOTLBnaELzmalUXhQaba24NkPcs2eeu13GpFT30PE0N/EONLX9fbFZqNeuyjVW5g7NDCgwFATyxTWmFNV7P1uTUwS/mTGLTTRj+fG6PdLaCuDC2UT8LuKCyoflar8vGp328En2A2k34ndy/+hFNIXvyZDEy4SzlzivlwJaUz1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415473; c=relaxed/simple; bh=yHJvs4che6WyhYHzxH8wT4v6HXxxwDmE2feB06/a0QY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZjdbcoLH/sI9CqBMT0MHRx50sftmfYjbbWSsZ4ERbd4FOeBd3zznCA8TLmHsWCn8B+VF8O+mbnX2u95CC5IRtXh0gK0rmBpCBV9VTCsqrGiHCOuUM3s2mScRQ5lNr5lneFgWX0l7AQMXmknY0YFbX0Wv3S+dpjpVKQB7RvfY8hs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XgTGszmx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XgTGszmx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA1A0C43390; Thu, 8 Feb 2024 18:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415473; bh=yHJvs4che6WyhYHzxH8wT4v6HXxxwDmE2feB06/a0QY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XgTGszmxQE3Wk32I7duZggjSPhqW9GNMht/S90Hhce0HOgMMHTmCh5iagf56vS/RQ lsZwnH+UjSh+9IT3ANTzDVZlhgnzBh9zs9XiOoknlEZklSFA7SjGWUOJZZVm6VrhC3 gkSlatMe561yStwVPFXfsmaPDASjbNC3vOtwoaAudkjDLZZi+oME5s5VAYZNn83MCM DkFRtvUtsjld5/Ifxyh0KsqB+UJ5WMgOQJ9hQKAbxNkka6TMaS5xQrL7R1w1pjEfUs ufGPyojuVBURq4kQe5Mzs3oLsIAVxjFFLNdOZ+rxa3oVyfpDdXBAwnnBzffx3Dz4t6 KnGsKJJV74ueQ== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:51 +0100 Subject: [PATCH net 3/7] mptcp: fix more tx path fields initialization Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-3-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2392; i=matttbe@kernel.org; h=from:subject:message-id; bh=BH9JwtYC2RN/3BDjjpe9vHZJy5WVFOfYRfxZhvGrfHM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxRehoTpOkhQagMNL0KqONyCoHfQC3+GgB+o7X hLmr9ahZ5KJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXoQAKCRD2t4JPQmmg c6QsD/9+sUDZ1mdnC9h189TtEe7cUCxjSjCf2hgQZ6q5p9UWmq8m/CkIkxsyi0S37ONi2QSE/sq kDVg0zfgcA3HnVdGJYZ219wpOWcSTT5O6TPAot3vre7gzOFtIiiHXK0QfpuhTquTQC697z4IUIh LhBpYK6uoDZH6ezQje3PKwddcA5v3XGtCQgEfUJRfn8+pbhFcZzsUZlyxhHFHRsO1hQJohYZon8 CRfdsk8BXLvyJODr6zpN/A/BzxJYk1eOFfn1TegSKHGVYBJ/QxKT34uxw8l5p5AHojkvp8BP5yW t2ozFgG4qcKOp/28LzMPCmszncJKvXWLluI03czeiu5GefBw7tVkEFZr1NMBZvIPoDDoa5Hw+5S s/p1mQ0EWqp0Dg5d8SrzfwghkRUkyPWMYWTAat2oy7Eo+RF3cqVFmvM5sDl/yY8ILm12GRQoEbd y7LIUzCl1MK0VjhFlsoyY5MBUYSy+20awY7muTWX6mGnO1VP5cmrmC91f2NVeU4douFSbNY2VC6 f0c9FAcFIZawV9V/+42VCGL5bGoEMfjW3a1We+e7mvY4EcK84Vnkku/uJjN7OepjpGXd2PWEO/s xbtAsNle5kH1n0seFi6FOenAvNeAyHS+ob2ee8F9JJNZHvkdemZCbKjJxcoSwyq6NOC16S1NbvC knAdu5d97NpXbfw== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Paolo Abeni The 'msk->write_seq' and 'msk->snd_nxt' are always updated under the msk socket lock, except at MPC handshake completiont time. Builds-up on the previous commit to move such init under the relevant lock. There are no known problems caused by the potential race, the primary goal is consistency. Fixes: 6d0060f600ad ("mptcp: Write MPTCP DSS headers to outgoing data packets") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/protocol.c | 6 ++---- net/mptcp/subflow.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 7632eafb683b..8cb6a873dae9 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3478,10 +3478,8 @@ void mptcp_finish_connect(struct sock *ssk) * accessing the field below */ WRITE_ONCE(msk->local_key, subflow->local_key); - WRITE_ONCE(msk->write_seq, subflow->idsn + 1); - WRITE_ONCE(msk->snd_nxt, msk->write_seq); - WRITE_ONCE(msk->snd_una, msk->write_seq); - WRITE_ONCE(msk->wnd_end, msk->snd_nxt + tcp_sk(ssk)->snd_wnd); + WRITE_ONCE(msk->snd_una, subflow->idsn + 1); + WRITE_ONCE(msk->wnd_end, subflow->idsn + 1 + tcp_sk(ssk)->snd_wnd); mptcp_pm_new_connection(msk, ssk, 0); } diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 56b2ac2f2f22..c2df34ebcf28 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -421,12 +421,21 @@ static bool subflow_use_different_dport(struct mptcp_sock *msk, const struct soc void __mptcp_sync_state(struct sock *sk, int state) { + struct mptcp_subflow_context *subflow; struct mptcp_sock *msk = mptcp_sk(sk); + struct sock *ssk = msk->first; - __mptcp_propagate_sndbuf(sk, msk->first); + subflow = mptcp_subflow_ctx(ssk); + __mptcp_propagate_sndbuf(sk, ssk); if (!msk->rcvspace_init) - mptcp_rcv_space_init(msk, msk->first); + mptcp_rcv_space_init(msk, ssk); + if (sk->sk_state == TCP_SYN_SENT) { + /* subflow->idsn is always available is TCP_SYN_SENT state, + * even for the FASTOPEN scenarios + */ + WRITE_ONCE(msk->write_seq, subflow->idsn + 1); + WRITE_ONCE(msk->snd_nxt, msk->write_seq); mptcp_set_state(sk, state); sk->sk_state_change(sk); } From patchwork Thu Feb 8 18:03:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550249 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 475B5128370; Thu, 8 Feb 2024 18:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415477; cv=none; b=i0ublDuiRgGX0QUJ6w21UD2ofHHL84AfHe+Q+mwAiIRubnr6Jgrh8EOUq6ZGNel6M43k3NOj15t3yp4Q1wSI5+DmatduVFFsv0phuFO7xOXcl79DXF9PyW2Fuj9G/qqd96wm9MZcI+Wd1IZgtprgMPyWSa45EAF0kMbk9EdSdSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415477; c=relaxed/simple; bh=B1tpBpXayfv5C4oprtq3aWGfISdNpEH0s3KkYlXv0Sw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DjHb/8kwslhysyG6hO3fI7H8JbZ0e2l+ROJvjMe6M523aKiheJ1uX/NpjNn80msHyvrOPkulxCQKiotyYYurT6sSDRL4oKrNmm5bUSQp+0heS9T3qTskJv5uTbtwOPQHH3QXzA/BUdS7E2AvM4BWQpA75ahNS/SVKVWfhl9o66I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=htSrZhK+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="htSrZhK+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD07EC43141; Thu, 8 Feb 2024 18:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415477; bh=B1tpBpXayfv5C4oprtq3aWGfISdNpEH0s3KkYlXv0Sw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=htSrZhK+EtWBFCu0hz+Y+TgNYG5/0v0aWvvrXeZ9e2ja4D/mms7icHR2nf+dJe9P2 fEBR3e0so03OpHNeAynxXIYZRIpkRCUSfwwpyZpnrKExde06W/UPuvbDKDrKIsseZ9 izHvD7r65Dw6VDSrZcOI4sp9hhBLjbFVhh1eQLTg2yxJsFpncTPhAXV3bkhuxHT1Cn LFQbjwrZESGA47VCPwkKWckHMZLkk/ttaQ043+zQH5E5X/T+j30JPFVjoymG6rNObl bDjJMjKAlpXVIHhjq2O5OUTKYda280CQl0oq8RLFyKb4G49Bip/e8uDnxvU85ybdU+ hHWxuAJF1Xwqg== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:52 +0100 Subject: [PATCH net 4/7] mptcp: corner case locking for rx path fields initialization Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-4-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=10427; i=matttbe@kernel.org; h=from:subject:message-id; bh=g0Rw4HDgt4Q54yco1/zI46zEx1HU/dDMukldMNg3NEA=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxRehXO9RcQy3GoVM7sF5g2ZeamRGhQnQUBe/g ix2f8nSFaCJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXoQAKCRD2t4JPQmmg c7/UD/9Dk4T6iEx+rbCfwt7OBN99/BeeKn5R499gV2z1y+5jjMQB+pl8XiHhSxG7v2df1wxKsyD sXA4JbKblzdMCvY/GzO/Xf/3TG1xdBj5xKY6EWbJkECEg2ln02vbewhqGdRBXmAMWCMPpjk+uiz 0NmRVWNE9I8E320+7ayfK3E8ojbURpR4xm0ZgNdQIpJGSeN4gu13aVx6IW4wwUrrqkY30kYR0dB si8XouRhGSZWnmGUb4Hxp+hCX7OxBH85R5GMTdtcav+vdcUVkOG2WfmsRh1ddE+iACwi6Dkzo69 Vn0H2dj26co/oHBt1WhQABF0KsyS9OTp1VcG7DqU+bhPrRM6bF8YP/710F0wIUOZe9SbZ8oAZin ubiPueUqPmPuIT2G+nBlPx0XD1EeHkriv3If+lwjbd/2+SYD7WBx19kaArfwF2PBoBI0kDhoer9 FYRoZpzqSZ4yh+4bJr7hsaJIJ6KQP6nmY8YyGb7DA7GrQR9P55Gdd0hllaD5/xleauPW5qYTSYT kmgGJhI+eBaYUrK1TMP5qmkEm9kQAmdNxz/7PwIoNjhA9JF/ZdDLIgC/HnzYjHjcLaat9FbTmRo 3cpdJArRTMz2q7G5/rbWm70L6QcYgygejeIegHsKeSGP2k7NjCdCJUy7GBVIyxwZuf1+IsfqRuC Raz348oDvPYW55w== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Paolo Abeni Most MPTCP-level related fields are under the mptcp data lock protection, but are written one-off without such lock at MPC complete time, both for the client and the server Leverage the mptcp_propagate_state() infrastructure to move such initialization under the proper lock client-wise. The server side critical init steps are done by mptcp_subflow_fully_established(): ensure the caller properly held the relevant lock, and avoid acquiring the same lock in the nested scopes. There are no real potential races, as write access to such fields is implicitly serialized by the MPTCP state machine; the primary goal is consistency. Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/fastopen.c | 6 ++---- net/mptcp/options.c | 9 +++++---- net/mptcp/protocol.c | 9 ++++++--- net/mptcp/protocol.h | 9 +++++---- net/mptcp/subflow.c | 56 ++++++++++++++++++++++++++++++---------------------- 5 files changed, 50 insertions(+), 39 deletions(-) diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c index 74698582a285..ad28da655f8b 100644 --- a/net/mptcp/fastopen.c +++ b/net/mptcp/fastopen.c @@ -59,13 +59,12 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf mptcp_data_unlock(sk); } -void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow, - const struct mptcp_options_received *mp_opt) +void __mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow, + const struct mptcp_options_received *mp_opt) { struct sock *sk = (struct sock *)msk; struct sk_buff *skb; - mptcp_data_lock(sk); skb = skb_peek_tail(&sk->sk_receive_queue); if (skb) { WARN_ON_ONCE(MPTCP_SKB_CB(skb)->end_seq); @@ -77,5 +76,4 @@ void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_ } pr_debug("msk=%p ack_seq=%llx", msk, msk->ack_seq); - mptcp_data_unlock(sk); } diff --git a/net/mptcp/options.c b/net/mptcp/options.c index d2527d189a79..e3e96a49f922 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -962,9 +962,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, /* subflows are fully established as soon as we get any * additional ack, including ADD_ADDR. */ - subflow->fully_established = 1; - WRITE_ONCE(msk->fully_established, true); - goto check_notify; + goto set_fully_established; } /* If the first established packet does not contain MP_CAPABLE + data @@ -986,7 +984,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, set_fully_established: if (unlikely(!READ_ONCE(msk->pm.server_side))) pr_warn_once("bogus mpc option on established client sk"); - mptcp_subflow_fully_established(subflow, mp_opt); + + mptcp_data_lock((struct sock *)msk); + __mptcp_subflow_fully_established(msk, subflow, mp_opt); + mptcp_data_unlock((struct sock *)msk); check_notify: /* if the subflow is not already linked into the conn_list, we can't diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 8cb6a873dae9..8ef2927ebca2 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3186,6 +3186,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, { struct mptcp_subflow_request_sock *subflow_req = mptcp_subflow_rsk(req); struct sock *nsk = sk_clone_lock(sk, GFP_ATOMIC); + struct mptcp_subflow_context *subflow; struct mptcp_sock *msk; if (!nsk) @@ -3226,7 +3227,8 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, /* The msk maintain a ref to each subflow in the connections list */ WRITE_ONCE(msk->first, ssk); - list_add(&mptcp_subflow_ctx(ssk)->node, &msk->conn_list); + subflow = mptcp_subflow_ctx(ssk); + list_add(&subflow->node, &msk->conn_list); sock_hold(ssk); /* new mpc subflow takes ownership of the newly @@ -3241,6 +3243,9 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, __mptcp_propagate_sndbuf(nsk, ssk); mptcp_rcv_space_init(msk, ssk); + + if (mp_opt->suboptions & OPTION_MPTCP_MPC_ACK) + __mptcp_subflow_fully_established(msk, subflow, mp_opt); bh_unlock_sock(nsk); /* note: the newly allocated socket refcount is 2 now */ @@ -3478,8 +3483,6 @@ void mptcp_finish_connect(struct sock *ssk) * accessing the field below */ WRITE_ONCE(msk->local_key, subflow->local_key); - WRITE_ONCE(msk->snd_una, subflow->idsn + 1); - WRITE_ONCE(msk->wnd_end, subflow->idsn + 1 + tcp_sk(ssk)->snd_wnd); mptcp_pm_new_connection(msk, ssk, 0); } diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 9f5ee82e3473..fefcbf585411 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -622,8 +622,9 @@ unsigned int mptcp_stale_loss_cnt(const struct net *net); unsigned int mptcp_close_timeout(const struct sock *sk); int mptcp_get_pm_type(const struct net *net); const char *mptcp_get_scheduler(const struct net *net); -void mptcp_subflow_fully_established(struct mptcp_subflow_context *subflow, - const struct mptcp_options_received *mp_opt); +void __mptcp_subflow_fully_established(struct mptcp_sock *msk, + struct mptcp_subflow_context *subflow, + const struct mptcp_options_received *mp_opt); bool __mptcp_retransmit_pending_data(struct sock *sk); void mptcp_check_and_set_pending(struct sock *sk); void __mptcp_push_pending(struct sock *sk, unsigned int flags); @@ -952,8 +953,8 @@ void mptcp_event_pm_listener(const struct sock *ssk, enum mptcp_event_type event); bool mptcp_userspace_pm_active(const struct mptcp_sock *msk); -void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow, - const struct mptcp_options_received *mp_opt); +void __mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow, + const struct mptcp_options_received *mp_opt); void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subflow, struct request_sock *req); diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index c2df34ebcf28..c34ecadee120 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -441,20 +441,6 @@ void __mptcp_sync_state(struct sock *sk, int state) } } -static void mptcp_propagate_state(struct sock *sk, struct sock *ssk) -{ - struct mptcp_sock *msk = mptcp_sk(sk); - - mptcp_data_lock(sk); - if (!sock_owned_by_user(sk)) { - __mptcp_sync_state(sk, ssk->sk_state); - } else { - msk->pending_state = ssk->sk_state; - __set_bit(MPTCP_SYNC_STATE, &msk->cb_flags); - } - mptcp_data_unlock(sk); -} - static void subflow_set_remote_key(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow, const struct mptcp_options_received *mp_opt) @@ -476,6 +462,31 @@ static void subflow_set_remote_key(struct mptcp_sock *msk, atomic64_set(&msk->rcv_wnd_sent, subflow->iasn); } +static void mptcp_propagate_state(struct sock *sk, struct sock *ssk, + struct mptcp_subflow_context *subflow, + const struct mptcp_options_received *mp_opt) +{ + struct mptcp_sock *msk = mptcp_sk(sk); + + mptcp_data_lock(sk); + if (mp_opt) { + /* Options are available only in the non fallback cases + * avoid updating rx path fields otherwise + */ + WRITE_ONCE(msk->snd_una, subflow->idsn + 1); + WRITE_ONCE(msk->wnd_end, subflow->idsn + 1 + tcp_sk(ssk)->snd_wnd); + subflow_set_remote_key(msk, subflow, mp_opt); + } + + if (!sock_owned_by_user(sk)) { + __mptcp_sync_state(sk, ssk->sk_state); + } else { + msk->pending_state = ssk->sk_state; + __set_bit(MPTCP_SYNC_STATE, &msk->cb_flags); + } + mptcp_data_unlock(sk); +} + static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); @@ -510,10 +521,9 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) if (mp_opt.deny_join_id0) WRITE_ONCE(msk->pm.remote_deny_join_id0, true); subflow->mp_capable = 1; - subflow_set_remote_key(msk, subflow, &mp_opt); MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEACTIVEACK); mptcp_finish_connect(sk); - mptcp_propagate_state(parent, sk); + mptcp_propagate_state(parent, sk, subflow, &mp_opt); } else if (subflow->request_join) { u8 hmac[SHA256_DIGEST_SIZE]; @@ -556,7 +566,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) } } else if (mptcp_check_fallback(sk)) { fallback: - mptcp_propagate_state(parent, sk); + mptcp_propagate_state(parent, sk, subflow, NULL); } return; @@ -741,17 +751,16 @@ void mptcp_subflow_drop_ctx(struct sock *ssk) kfree_rcu(ctx, rcu); } -void mptcp_subflow_fully_established(struct mptcp_subflow_context *subflow, - const struct mptcp_options_received *mp_opt) +void __mptcp_subflow_fully_established(struct mptcp_sock *msk, + struct mptcp_subflow_context *subflow, + const struct mptcp_options_received *mp_opt) { - struct mptcp_sock *msk = mptcp_sk(subflow->conn); - subflow_set_remote_key(msk, subflow, mp_opt); subflow->fully_established = 1; WRITE_ONCE(msk->fully_established, true); if (subflow->is_mptfo) - mptcp_fastopen_gen_msk_ackseq(msk, subflow, mp_opt); + __mptcp_fastopen_gen_msk_ackseq(msk, subflow, mp_opt); } static struct sock *subflow_syn_recv_sock(const struct sock *sk, @@ -844,7 +853,6 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, * mpc option */ if (mp_opt.suboptions & OPTION_MPTCP_MPC_ACK) { - mptcp_subflow_fully_established(ctx, &mp_opt); mptcp_pm_fully_established(owner, child); ctx->pm_notified = 1; } @@ -1756,7 +1764,7 @@ static void subflow_state_change(struct sock *sk) mptcp_do_fallback(sk); pr_fallback(msk); subflow->conn_finished = 1; - mptcp_propagate_state(parent, sk); + mptcp_propagate_state(parent, sk, subflow, NULL); } /* as recvmsg() does not acquire the subflow socket for ssk selection From patchwork Thu Feb 8 18:03:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550250 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71CB8128833; Thu, 8 Feb 2024 18:04:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415481; cv=none; b=DfVtkaixQaDa376Kx0opBnP67T7vJm6rV6HpUY8lPdfhQ+66lb0m5NIpguKweNYUiqUYbhol75fVBX+tSHsPAWyDS7r4nYmqCVjByLSml77tHmnuHlqQGjVGZUIaug09okOIQNMrgIFDDMjcd5jm+ZaCMRa7ZGdpjBkjAyKQCtU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415481; c=relaxed/simple; bh=NvTXRnuON6qPQNYuNjtmkLBaOdT6vLsUQt2KlMjwaRg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Hlalu6oY95u57LnyPAVQQI+KUD6pPjhcGV1cXSPXtCyIQAO0h5Dlr90L5uEo/nern3R9bSxtwsHLQFgZAtQ5ceKp/iB02/S4vr4ABMQhXf9M+0Nt+TwSxPdHqrV7S5mJZ1VAcvAMVpQ21Vf0GZ9lDk8MVGXUj3Rz26/ZCoAFB+g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AfsCf+hv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AfsCf+hv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F90FC43399; Thu, 8 Feb 2024 18:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415480; bh=NvTXRnuON6qPQNYuNjtmkLBaOdT6vLsUQt2KlMjwaRg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=AfsCf+hvzcWGGLz8s8ueraM6xG333BQf/2BM1uSkw3s2DmRiP758Un8yRR76tvNaO w71OU7ffxu4lw41dLeeHBMWf1pzT/kUQUgDeKyoh3A2dAfU1ucqfxx2qXU9fOrIBkR OfhwynHiDhDgUjRAW6d4dmj8rpotTmGZJurv/p1QJ6wQUBSrN7k5qOprNFoc3V9uly synif8g6FoxJ4TEQ8EgVm4cPsnjaJGVUNv8Hcjn8fZMvEfWbekKqwLn86fTTKITxZa BOfan8bj8G+SJ9+hyDak8Hs1Yq5uJAtVaLI8zBt3oSfS/LA+ZdAB2ECHjeb/2KBoEr UmElN3vqcGwRg== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:53 +0100 Subject: [PATCH net 5/7] mptcp: check addrs list in userspace_pm_get_local_id Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-5-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" , stable@vger.kernel.org, Geliang Tang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1624; i=matttbe@kernel.org; h=from:subject:message-id; bh=8aCCu0yid68+GRgZ0xl8ByhW49kl62JqasxySjE1hiQ=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxRehMiBc0n4f5gHnwPOyMOq49tP8zHm2lFVkT cE0jZcZVGWJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXoQAKCRD2t4JPQmmg cxntEADURwJIyiZOlgRgmGk5605OerW8KhB2LAduQSzURfaFwUvTMpY0gAlP1jNEPHikGDBNPiF uOL+nPGidIDA/aoBUA18uSMVjP3lW6Fo/f5eAwPyMnPQzp8zVGkvOWDf7mi5Z5W+3dufYQfggYk U9Buxrb/uZ5Qq1Mnlu1Q0WwFrHTUjfUWZRMvOw5K/8fY2kN7qg1JxHDLpspfHM+qqdhsyi+73nF VITEEcn0tF2QxUxwP72FP/RhxO3e/dXoz7nmwmqLO4BUzO7smxueGgWJtYJNROjKC+g739r5VQX zAtfaGgm+MwHw4ZTMhRDJ/TqHGjJ5qxVQD+LkjfXj4aTY61N9onisctTHJ+HvhgIMaPW8bJ/GM3 5ymw4/GaknE8KN9ZmHjDvECOyFjfCoRYr8R2KnG4sN7TjMbMmrbfPLaXlocEwxjqUh9pLKkbLkQ l9lOr96uMF9YAU3HhgrpYZDjQLPGQ1R4F6Pi8U6IxQm7nzrFpcFgUFb705muBu4J1Lfe1vICjEX Y04hObPoIAElQd8fHfgLLRwyOqrCvvOsMWEpUaRLs17bVgYOR7Og5NFPurVFn4zB77d4qImkjYy a4b7uGx1pV7rx5xwie7qk+buNeYwnnQ1P1C+F5/xyGdnDOOQtyxS8ttuea2UY08zLE/Y90Zo7dd SqFfspoFmeCNIJQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Geliang Tang Before adding a new entry in mptcp_userspace_pm_get_local_id(), it's better to check whether this address is already in userspace pm local address list. If it's in the list, no need to add a new entry, just return it's address ID and use this address. Fixes: 8b20137012d9 ("mptcp: read attributes of addr entries managed by userspace PMs") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/pm_userspace.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index efecbe3cf415..4f3901d5b8ef 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -130,10 +130,21 @@ int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk, struct mptcp_addr_info *skc) { - struct mptcp_pm_addr_entry new_entry; + struct mptcp_pm_addr_entry *entry = NULL, *e, new_entry; __be16 msk_sport = ((struct inet_sock *) inet_sk((struct sock *)msk))->inet_sport; + spin_lock_bh(&msk->pm.lock); + list_for_each_entry(e, &msk->pm.userspace_pm_local_addr_list, list) { + if (mptcp_addresses_equal(&e->addr, skc, false)) { + entry = e; + break; + } + } + spin_unlock_bh(&msk->pm.lock); + if (entry) + return entry->addr.id; + memset(&new_entry, 0, sizeof(struct mptcp_pm_addr_entry)); new_entry.addr = *skc; new_entry.addr.id = 0; From patchwork Thu Feb 8 18:03:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550251 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57EDE1292EC; Thu, 8 Feb 2024 18:04:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415485; cv=none; b=KPddzjQ9qLFm6mOdizzamKBqfFAPqmLJ/D+i09BcFwrSY6dWAatJGLiOVOPdMjeGn/v4UBP8YklX3cM/mbqpLuUNDEP2zg5io0UOaxGfXglspBGnbjRaaGdNV6Fmwd1Zs6/HcxRa+gsyjF75Uldwb4C5Wq8AaohivkkXISLSMVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415485; c=relaxed/simple; bh=r/gq3pLyzLbtSrMv4ZRs7gB0vsiao3xcDTWrjPKBybM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JV4pVzIrsauPmu2wpge6m13ZQqoNEXSQofozYaveGd01ahFtwMWsyIxB7xl+x65UfugUM51zEO0FifEk+XZKJ8amA2q+QEFdzd/afTkGpugNRsmZq0HO+EfZk6dN9fd3j+TejRb34CIkHYPvwmEq9+qrKovx4DpXOA9DK4Wr/uk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jJ27hc0d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jJ27hc0d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5119CC43394; Thu, 8 Feb 2024 18:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415484; bh=r/gq3pLyzLbtSrMv4ZRs7gB0vsiao3xcDTWrjPKBybM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jJ27hc0dnYocwuK2M0zn/x1HALa/GNyyY8Kasu3+DrzFHISxYGgGDQOff01tANjE0 MWhJijoM8gleA8DIKr+LzkNxSPdTSJXRD8YAQJCqGIv9wYZ1VVq1PTKKmVv3gIonwz qIr1prV4iWsteLjzETfXYFRMB5Dkvv6yZFgj6d+dN97rqKy2gi/jguoc8+ErOfuFHz BRAQdpVxhY5uCq4IAxkglctiaRuorLYz/h5qcbAA1eqSVDZGKksGDniCt5f5y9C3PR xF3eWg42+J+/M68Y5mBUiXyzsVyZZ6BZhYbRnbNk6Q5bswFUoAWbneJE4RPNaoikxW qnknJdEtcDJMw== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:54 +0100 Subject: [PATCH net 6/7] mptcp: really cope with fastopen race Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-6-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" , stable@vger.kernel.org, syzbot+c53d4d3ddb327e80bc51@syzkaller.appspotmail.com X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1482; i=matttbe@kernel.org; h=from:subject:message-id; bh=7St1EIuD4jOroFFmBmJJjLJG0zQDFjSrZU1TgGoBZ4o=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxReiZsjM2YLGYloOqWhio7IaFMr8gh9SGHTh9 n0LbilZceSJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXogAKCRD2t4JPQmmg cxqpEACWaUxiGKk/u59y1R0CdAfyxBluBLO1aeH3adsgZAUA/wmZSNGz7P8/zoIee+LKtyE2nhT AhWxtkEngjcO+UmlPcJu9U3aZ0ttDzWVzWEuFbbFpTb53+C8hTLrwpfWwAWSq9DDH7bkVdtc2fn 6sKhwVAtvO5b8IA3ItNq5CKPUTAsIkNPS5mbV/hOMh91Y2277W+PNQ3CM+AJz27S2anN9fwC7uD BkFw+fkarBzQ+8vm4FzYSPO7wx9PDMkrwIAjq52gB3AJLztDDqujKpvu98BCzNTi0s1YHhPzzgj 740TEiNvhJ+t/s9WskPrfalQvURvFk9y/EG5+W3RbivJmWUi80gC10AnBpnwHj9lXCoWROH4ZRE vsh3yLh81sH240xu295ZAr09c38nzMh+8SYZkuNuOSwXfsO8UiL/VxDR2k3WroZGEthiMGuBegA 6EVwrC3w+zG5NnSqwlhwhvpgkzNQd7K3p9DgG7xFI1RForcjDI3lO+VYvlZgus+OE3I2pkoIbdU 5Z1aRVHRc0A08bSiA7Zkd/IUstbkOzBrTcmFb2z4UIGhbX/ykC/ebZhthJAH6WR9SpXZtZIlj+k SuOjmZN4Zs/nx2XWBlyyFiLT5IwencUfMMgNaurHMHJdNhYtTT6Os5un4yBXM3byvkdwylLMJY+ ss//RAXVz4qPFzg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Paolo Abeni Fastopen and PM-trigger subflow shutdown can race, as reported by syzkaller. In my first attempt to close such race, I missed the fact that the subflow status can change again before the subflow_state_change callback is invoked. Address the issue additionally copying with all the states directly reachable from TCP_FIN_WAIT1. Fixes: 1e777f39b4d7 ("mptcp: add MSG_FASTOPEN sendmsg flag support") Fixes: 4fd19a307016 ("mptcp: fix inconsistent state on fastopen race") Cc: stable@vger.kernel.org Reported-by: syzbot+c53d4d3ddb327e80bc51@syzkaller.appspotmail.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/458 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/protocol.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index fefcbf585411..ed50f2015dc3 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -1129,7 +1129,8 @@ static inline bool subflow_simultaneous_connect(struct sock *sk) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); - return (1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_FIN_WAIT1) && + return (1 << sk->sk_state) & + (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSING) && is_active_ssk(subflow) && !subflow->conn_finished; } From patchwork Thu Feb 8 18:03:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13550252 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEBE786132; Thu, 8 Feb 2024 18:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415488; cv=none; b=rlViRyWj5x4O55c8+0TDcmSj2TOrZ0P0zyEa6d4DE8nEYvIECxznF7HJOhjftTSMXXsTc/xc9MoDijmW0A9UDc5cSwJ1XKakPrDgeg5Rk2yPDQXYNAyk7iLEB9cVidohTLgPYA5qoRmldENQDT4fG3U5i02fg7c1PORGpCvb8nY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415488; c=relaxed/simple; bh=3Uhrwe4sRvrwINsS64MrEMTgrGNb4S7Ahy2QqbR4f0o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W0ubRPsFx7QfgAfmamB0kvVaf2NThr8WbPoPSpoqD9azJhozzIeXKi4agGORm1rMoJscsOJ8lhm4LPNFJ0BA669b9F/GJ9kMEVYJhd04zR+iRWyWop4e2/DhlFjZeojrYAtM5D15gVcEl1TyKou0bgnZfqctX/X5/+Q49sLIdbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UhoL6Cm5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UhoL6Cm5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E80DC43399; Thu, 8 Feb 2024 18:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415488; bh=3Uhrwe4sRvrwINsS64MrEMTgrGNb4S7Ahy2QqbR4f0o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UhoL6Cm5ieWcXeo8f3wJo/Me6dy0QuAxDjlVGWEoAH+fs64ZU02V+5+Fj0k2eAkwF BYSNB5k4bywcbzwIOnDhqk9Dv0/aNzw36wtrHkEdVttsCDu7HMqdPa6xSHxGoO/yZI LcDj3OOmkJUUckY79T4UUKhJC9pP9LLhQ1/kLOJX6E/FitqpQH7Ee7C/YWMAEAjTwX k1ZpeRL25RN3fDrn8VEKpiHY8OmF3340jlfEc27+W0DVG0VJfkcyK5PNGOeKrHNPVy b/ns23XurVR8BA/HL0bUJWFwHIUnuP8aqeg8GacwiQl+22sOYjSGsL3tOx2GuLDDAs 5cMd3bn2pkR6g== From: "Matthieu Baerts (NGI0)" Date: Thu, 08 Feb 2024 19:03:55 +0100 Subject: [PATCH net 7/7] MAINTAINERS: update Geliang's email address Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-7-f75cc5b97e5a@kernel.org> References: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> In-Reply-To: <20240208-upstream-net-20240202-locking-cleanup-misc-v1-0-f75cc5b97e5a@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kishen Maloor , Florian Westphal , Peter Krystad , Dmytro Shytyi , Benjamin Hesmans Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Paasch , "Matthieu Baerts (NGI0)" X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1962; i=matttbe@kernel.org; h=from:subject:message-id; bh=tZVKtIFKLYUt/oUS595FbNi1gycPQG00LtyiN6EKU6k=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBlxReiRCw+6cpvej3wyzo48ma+ikX1bsTWfnN8K mGQLRB5xOGJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZcUXogAKCRD2t4JPQmmg c4UJEADeoCILa8kvid/d8rgzep3cR6jKmDzEGODmFgosVbyMKYZVrdxDdyQqfw8CwbHtgpwhO8X 9YmoWCOvs3f3/7Mf8cQYS4isCSuSt9MoyB2/MZjHX3JDuWOIqE7E4F4cNVQdskcT6ztSugCbMoE 7iQK9iSFMJAwJAF6U7qd3COGYLJY8xzo1eYOXJYnnteDSLcifXuu775elASlE+aLI7Ppwk0srtb ADZuDQZh3v2yekBgm6PYi6raHNl0qdDwSaWCVebqnztwKien9kGD5MX9OxqCT4DilvVsiFNLfbA +zVLMKA3yKIw8OJ2XMZuJ7Ni+kjE5rpskdWNbOSASkl+QMaV2GAu0aewpprA6XX0JdBxrfFXGzI XyzQRN0PlTx0J9dU8KR2ebwJDHeLgf3lqVXKIyjS19K4kBsPVK1v2JMApy3ikyDuw68ntbD367+ u8HAEIrDTiSraolcW8GRaImki2/LhP/PNgl2W9ttgucddtoYcjesrXYpW3akNMqp9ACtcFfy1N+ Locb/FRi5jBFEqoWEvHxXi7VqDftm6r+JsxScZFFDpuW8pGr/esA28xh4YDh9Th5fHDW/Qwwirh 6e99w8h3kG7VpeBBnaWUTbWaIJvqY9LO8oiOzUaxnGtO9m/3AlDLhYFLjxAIufEimViK1jvPrKp JLKpCrzKGpkkGoA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Geliang Tang Update my email-address in MAINTAINERS and .mailmap entries to my kernel.org account. Suggested-by: Mat Martineau Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) --- .mailmap | 9 +++++---- MAINTAINERS | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.mailmap b/.mailmap index 04998f7bda81..327e7eddd146 100644 --- a/.mailmap +++ b/.mailmap @@ -191,10 +191,11 @@ Gao Xiang Gao Xiang Gao Xiang Gao Xiang -Geliang Tang -Geliang Tang -Geliang Tang -Geliang Tang +Geliang Tang +Geliang Tang +Geliang Tang +Geliang Tang +Geliang Tang Georgi Djakov Gerald Schaefer Gerald Schaefer diff --git a/MAINTAINERS b/MAINTAINERS index 42bdf99ed979..d7b5c622575a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15324,7 +15324,7 @@ K: \bmdo_ NETWORKING [MPTCP] M: Matthieu Baerts M: Mat Martineau -R: Geliang Tang +R: Geliang Tang L: netdev@vger.kernel.org L: mptcp@lists.linux.dev S: Maintained