All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Kalpan Jani <kalpan.jani@mpiricsoftware.com>
Cc: mptcp <mptcp@lists.linux.dev>, martineau <martineau@kernel.org>,
	pabeni <pabeni@redhat.com>,
	"shardul.b" <shardul.b@mpiricsoftware.com>,
	janak <janak@mpiric.us>, kalpanjani009 <kalpanjani009@gmail.com>
Subject: Re: [PATCH net-next v2] mptcp: normalize seq numbers reported in mptcp_info
Date: Tue, 1 Sep 2026 07:55:08 +0200	[thread overview]
Message-ID: <22e3fc57-a6e7-4a72-a6c1-1d6b3bc39f3d@kernel.org> (raw)
In-Reply-To: <1a05b681764.2d9af68b190464.2524660538561791488@mpiricsoftware.com>

Hi Kalpan,

01 Sept 2026 07:19:21 Kalpan Jani <kalpan.jani@mpiricsoftware.com>:

> Hey Matt,
>
> Thanks for the suggestion. I dug into msk->first before reworking it.
>
> Turns out it's only ever set once (either connect side or accept side) and never reassigned to a different subflow after that, so at least we don't have to worry about picking up idsn from the wrong one later.
>
> But it does go NULL independent of whether other subflows are still around, and it's not even a rare thing. I added a debug print in __mptcp_close_ssk() and ran mptcp_join.sh, and it happens constantly with other subflows still in the list. I couldn't find anywhere that write_seq/snd_una/ack_seq get reset in that case either, so reading idsn/iasn straight off msk->first in mptcp_diag_fill_info() would need a NULL check, otherwise it'd crash pretty often during normal multi-subflow use.

Thank you for having checked.

Is it not only set to NULL when the whole msk is being destroyed? So
yes, it could be set to NULL first while closing all the subflows, but is it
an issue at that stage? Maybe you will need to add an extra check to
avoid a crash, but (I didn't check) maybe there are already protections
in place and it cannot race.

(Note: I'm not on my laptop, I didn't verify this)

Cheers,
Matt

  reply	other threads:[~2026-09-01  5:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  4:10 [PATCH net-next v2] mptcp: normalize seq numbers reported in mptcp_info Kalpan Jani
2026-08-27  5:15 ` MPTCP CI
2026-08-31 10:29 ` Matthieu Baerts
2026-09-01  5:19   ` Kalpan Jani
2026-09-01  5:55     ` Matthieu Baerts [this message]
2026-09-02  6:48       ` Kalpan Jani
2026-09-02  7:46         ` Matthieu Baerts
  -- strict thread matches above, loose matches on Subject: below --
2026-08-25 11:33 [PATCH net-next] " Kalpan Jani
2026-08-26  6:03 ` [PATCH net-next v2] " Kalpan Jani
2026-08-26  7:26   ` MPTCP CI
2026-08-26  9:48   ` Kalpan Jani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22e3fc57-a6e7-4a72-a6c1-1d6b3bc39f3d@kernel.org \
    --to=matttbe@kernel.org \
    --cc=janak@mpiric.us \
    --cc=kalpan.jani@mpiricsoftware.com \
    --cc=kalpanjani009@gmail.com \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=shardul.b@mpiricsoftware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.