From: Paolo Abeni <pabeni@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>,
Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: netdev@vger.kernel.org, Florian Westphal <fw@strlen.de>,
davem@davemloft.net, matthieu.baerts@tessares.net,
mptcp@lists.linux.dev
Subject: Re: [PATCH net-next 03/10] mptcp: add SIOCINQ, OUTQ and OUTQNSD ioctls
Date: Tue, 07 Dec 2021 11:30:42 +0100 [thread overview]
Message-ID: <fac880302f38aa66a5e593c03dc3e06b329c33e9.camel@redhat.com> (raw)
In-Reply-To: <20211206171648.4608911f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Hello,
On Mon, 2021-12-06 at 17:16 -0800, Jakub Kicinski wrote:
> On Fri, 3 Dec 2021 14:35:34 -0800 Mat Martineau wrote:
> > + if (sk->sk_state == TCP_LISTEN)
> > + return -EINVAL;
> > +
> > + lock_sock(sk);
> > + __mptcp_move_skbs(msk);
> > + answ = mptcp_inq_hint(sk);
> > + release_sock(sk);
>
> The raciness is not harmful here?
Thank you for the careful review!
AFAICS the race between the socket state test and the receive queue
lenght estimate is not harmful: if a socket is concurrently
disconnected and moved to a listen status, mptcp_inq_hint() will return
0, as plain TCP would do in the same scenario - all the fields accessed
by __mptcp_move_skbs() and mptcp_inq_hint() will be in a consistant
status (modulo unknown bugs).
Cheers,
Paolo
next prev parent reply other threads:[~2021-12-07 10:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 22:35 [PATCH net-next 00/10] mptcp: New features for MPTCP sockets and netlink PM Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 01/10] mptcp: add TCP_INQ cmsg support Mat Martineau
2021-12-07 1:14 ` Jakub Kicinski
2021-12-03 22:35 ` [PATCH net-next 02/10] selftests: mptcp: add TCP_INQ support Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 03/10] mptcp: add SIOCINQ, OUTQ and OUTQNSD ioctls Mat Martineau
2021-12-07 1:16 ` Jakub Kicinski
2021-12-07 10:21 ` Florian Westphal
2021-12-07 10:30 ` Paolo Abeni [this message]
2021-12-03 22:35 ` [PATCH net-next 04/10] selftests: mptcp: add inq test case Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 05/10] mptcp: allow changing the "backup" bit by endpoint id Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 06/10] mptcp: getsockopt: add support for IP_TOS Mat Martineau
2021-12-07 1:25 ` Jakub Kicinski
2021-12-03 22:35 ` [PATCH net-next 07/10] selftests: mptcp: check IP_TOS in/out are the same Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 08/10] tcp: expose __tcp_sock_set_cork and __tcp_sock_set_nodelay Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 09/10] mptcp: expose mptcp_check_and_set_pending Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 10/10] mptcp: support TCP_CORK and TCP_NODELAY Mat Martineau
2021-12-07 1:30 ` Jakub Kicinski
2021-12-07 10:19 ` Florian Westphal
2021-12-07 10:37 ` Paolo Abeni
2021-12-07 20:40 ` [PATCH net-next 00/10] mptcp: New features for MPTCP sockets and netlink PM patchwork-bot+netdevbpf
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=fac880302f38aa66a5e593c03dc3e06b329c33e9.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kuba@kernel.org \
--cc=mathew.j.martineau@linux.intel.com \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox