MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH mptcp-net] mptcp: avoid printing warning once on client side
@ 2024-02-15 15:06 Matthieu Baerts (NGI0)
  2024-02-15 15:54 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2024-02-15 15:06 UTC (permalink / raw)
  To: mptcp; +Cc: Paolo Abeni, Matthieu Baerts (NGI0)

After the 'Fixes' commit mentioned below, the client side might print
the following warning once when a subflow is fully established at the
reception of any valid additional ack:

  MPTCP: bogus mpc option on established client sk

That's a normal situation, and no warning should be printed for that. We
can then skip the check when the label is used.

Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields initialization")
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Notes:
 - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
   our tree? Or just in DEBUG mode?
---
 net/mptcp/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 23e317ffc901..27ca42c77b02 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -981,10 +981,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 	if (mp_opt->deny_join_id0)
 		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
 
-set_fully_established:
 	if (unlikely(!READ_ONCE(msk->pm.server_side)))
 		pr_warn_once("bogus mpc option on established client sk");
 
+set_fully_established:
 	mptcp_data_lock((struct sock *)msk);
 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
 	mptcp_data_unlock((struct sock *)msk);

---
base-commit: 52e05de42e1094a943053af93ea08c51a44091f7
change-id: 20240215-mptcp-fix-bogus-pr-warn-497a3537984b

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-02-16 19:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
2024-02-15 15:54 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
2024-02-15 16:20 ` MPTCP CI
2024-02-15 16:43 ` MPTCP CI
2024-02-15 23:25 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Mat Martineau
2024-02-16 10:42   ` Matthieu Baerts
2024-02-16 11:23     ` Paolo Abeni
2024-02-16 11:33       ` Matthieu Baerts
2024-02-16 19:59         ` Mat Martineau
2024-02-16  0:24 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
2024-02-16  0:45 ` MPTCP CI
2024-02-16 10:46 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox