[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+_1Y_ARBnZO0H-DvSrT0N6+YcUy+S6Xi4Lw0VXgaSrRA@mail.gmail.com>
Date: Tue, 14 Oct 2025 23:44:04 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: luoxuanqiang <xuanqiang.luo@...ux.dev>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, netdev@...r.kernel.org,
eric.dumazet@...il.com, Kuniyuki Iwashima <kuniyu@...gle.com>
Subject: Re: [PATCH net-next] net: remove obsolete WARN_ON(refcount_read(&sk->sk_refcnt)
== 1)
On Tue, Oct 14, 2025 at 11:04 PM luoxuanqiang <xuanqiang.luo@...ux.dev> wrote:
>
>
> 在 2025/10/14 22:06, Eric Dumazet 写道:
> > sk->sk_refcnt has been converted to refcount_t in 2017.
> >
> > __sock_put(sk) being refcount_dec(&sk->sk_refcnt), it will complain
> > loudly if the current refcnt is 1 (or less) in a non racy way.
> >
> > We can remove four WARN_ON() in favor of the generic refcount_dec()
> > check.
> >
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>
> Reviewed-by: Xuanqiang Luo<luoxuanqiang@...inos.cn>
>
> Dear Eric,
>
> Following your line of thought, I found there's also a point in btrfs that
> needs modification.
>
> Would you like to modify it together? Though it has nothing to do with
> socket, or shall I modify it separately later?
I removed stuff around sk_refcnt only.
If you want, please send a patch to the appropriate lists and maintainers.
Powered by blists - more mailing lists