]> www.infradead.org Git - users/dwmw2/linux.git/commit
af_unix: Remove put_pid()/put_cred() in copy_peercred().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Thu, 20 Jun 2024 20:56:22 +0000 (13:56 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Jun 2024 09:10:18 +0000 (11:10 +0200)
commite4bd881d987121dbf1a288641491955a53d9f8f7
treeef2df0464c770cbbc8c3fef267286bea0ab0dca8
parentfaf489e6896d645a679d3d90a2d1d5d12c6b3e13
af_unix: Remove put_pid()/put_cred() in copy_peercred().

When (AF_UNIX, SOCK_STREAM) socket connect()s to a listening socket,
the listener's sk_peer_pid/sk_peer_cred are copied to the client in
copy_peercred().

Then, the client's sk_peer_pid and sk_peer_cred are always NULL, so
we need not call put_pid() and put_cred() there.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/unix/af_unix.c