linux/net/netlink
Eric Dumazet e5b670e543 net: remove obsolete WARN_ON(refcount_read(&sk->sk_refcnt) == 1)
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@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Xuanqiang Luo<luoxuanqiang@kylinos.cn>
Link: https://patch.msgid.link/20251014140605.2982703-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
History 2025-10-15 17:18:38 -07:00
..
af_netlink.c net: remove obsolete WARN_ON(refcount_read(&sk->sk_refcnt) == 1) 2025-10-15 17:18:38 -07:00
af_netlink.h netlink: terminate outstanding dump on socket close 2024-11-07 13:45:34 -08:00
diag.c net: lockless sock_i_ino() 2025-09-03 16:08:24 -07:00
genetlink.c genetlink: fix genl_bind() invoking bind() after -EPERM 2025-09-08 17:50:36 -07:00
genetlink.h netlink: create a new header for internal genetlink symbols 2024-04-01 21:44:34 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
policy.c netlink: fix policy dump for int with validation callback 2025-05-12 18:50:09 -07:00