[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvbK_fTP1x0uqz3w9OPLpGPLMD5AcCfwT0-Lx2dkPXDGLVqxw@mail.gmail.com>
Date: Tue, 29 Aug 2023 15:05:09 -0400
From: Xin Long <lucien.xin@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org,
eric.dumazet@...il.com, syzbot <syzkaller@...glegroups.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCH net] sctp: annotate data-races around sk->sk_wmem_queued
On Tue, Aug 29, 2023 at 2:19 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Aug 29, 2023 at 8:14 PM Xin Long <lucien.xin@...il.com> wrote:
> >
> > On Mon, Aug 28, 2023 at 8:44 AM Eric Dumazet <edumazet@...gle.com> wrote:
> > >
> > > sk->sk_wmem_queued can be read locklessly from sctp_poll()
> > >
> > > sk->sk_rcvbuf);
> > Just wondering why sk->sk_sndbuf/sk_rcvbuf doesn't need READ_ONCE()
> > while adding READ_ONCE for sk->sk_wmem_queued in here?
> >
>
> Separate patches for sk_sndbuf, sk_rcvbuf, sk_err, sk_shutdown, and
> many other socket fields.
>
> I prefer having small patches to reduce merge conflicts in backports.
>
> Note that I used READ_ONCE(sk->sk_sndbuf) in sctp_writeable(),
> (I assume this is why you asked)
Yes.
Not sure about tcp's seq_show, but as sctp_assocs_seq_show() is only
under rcu_read_lock() and with a hold of transport/association/socket,
does it mean all members of assoc should also use READ_ONCE()?
(Note I think we don't expect the seq show to be that accurate.)
Thanks.
Powered by blists - more mailing lists