]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: remove sock_i_uid()
authorEric Dumazet <edumazet@google.com>
Fri, 20 Jun 2025 13:30:01 +0000 (13:30 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Jun 2025 00:04:03 +0000 (17:04 -0700)
commitc51da3f7a161c6822232be832abdffe47eb55b4c
treec4b86a281dc187fc8b74f9723043e2bfa87bd7d8
parente84a4927a404f369c842c19de93b216627fcc690
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 <edumazet@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Link: https://patch.msgid.link/20250620133001.4090592-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
26 files changed:
include/net/sock.h
net/appletalk/atalk_proc.c
net/bluetooth/af_bluetooth.c
net/core/sock.c
net/ipv4/inet_connection_sock.c
net/ipv4/inet_diag.c
net/ipv4/inet_hashtables.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/tcp_ipv4.c
net/ipv4/udp.c
net/ipv6/datagram.c
net/ipv6/tcp_ipv6.c
net/key/af_key.c
net/llc/llc_proc.c
net/packet/af_packet.c
net/packet/diag.c
net/phonet/socket.c
net/sctp/input.c
net/sctp/proc.c
net/sctp/socket.c
net/smc/smc_diag.c
net/tipc/socket.c
net/unix/af_unix.c
net/unix/diag.c
net/xdp/xsk_diag.c