[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLRkPu6XVhcwridPTrPRtfwQu61jdKZGcZ7aOXRkJy0zQ@mail.gmail.com>
Date: Sun, 23 Oct 2022 14:33:02 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com, syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net 2/2] kcm: annotate data-races around kcm->rx_wait
On Sat, Oct 22, 2022 at 7:46 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Thu, Oct 20, 2022 at 10:45:12PM +0000, Eric Dumazet wrote:
> > kcm->rx_psock can be read locklessly in kcm_rfree().
>
> Copy-n-paste typo here.
>
> > Annotate the read and writes accordingly.
>
> I wonder why not simply acquire mux->rx_lock earlier?
I would think kcm_rfree() is called very often (per skb)
Grabbing the spinlock would add a performance regression.
READ_ONCE() is a no brainer here.
>
> Thanks.
Powered by blists - more mailing lists