aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/datagram.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2025-06-20 13:30:01 +0000
committerJakub Kicinski <[email protected]>2025-06-24 00:04:03 +0000
commitc51da3f7a161c6822232be832abdffe47eb55b4c (patch)
treec4b86a281dc187fc8b74f9723043e2bfa87bd7d8 /net/ipv6/datagram.c
parentnet: annotate races around sk->sk_uid (diff)
downloadkernel-c51da3f7a161c6822232be832abdffe47eb55b4c.tar.gz
kernel-c51da3f7a161c6822232be832abdffe47eb55b4c.zip
net: remove sock_i_uid()
Difference between sock_i_uid() and sk_uid() is that after sock_orphan(), sock_i_uid() returns GLOBAL_ROOT_UID while sk_uid() returns the last cached sk->sk_uid value. None of sock_i_uid() callers care about this. Use sk_uid() which is much faster and inlined. Note that diag/dump users are calling sock_i_ino() and can not see the full benefit yet. Signed-off-by: Eric Dumazet <[email protected]> Cc: Lorenzo Colitti <[email protected]> Reviewed-by: Maciej Żenczykowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv6/datagram.c')
-rw-r--r--net/ipv6/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 83f5aa5e133a..281722817a65 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -1064,7 +1064,7 @@ void __ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp,
sk_wmem_alloc_get(sp),
rqueue,
0, 0L, 0,
- from_kuid_munged(seq_user_ns(seq), sock_i_uid(sp)),
+ from_kuid_munged(seq_user_ns(seq), sk_uid(sp)),
0,
sock_i_ino(sp),
refcount_read(&sp->sk_refcnt), sp,