[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAVpQUCUYCA4_EchpaaZ8SafmtYkYAMKCmS9oDM3bCxzeo5Ebw@mail.gmail.com>
Date: Tue, 14 Oct 2025 19:06:32 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
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, Xuanqiang Luo <luoxuanqiang@...inos.cn>
Subject: Re: [PATCH net-next] net: remove obsolete WARN_ON(refcount_read(&sk->sk_refcnt)
== 1)
On Tue, Oct 14, 2025 at 7:06 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> 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: Kuniyuki Iwashima <kuniyu@...gle.com>
Thanks for catching this!
Powered by blists - more mailing lists