]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
af_unix: Return struct unix_sock from unix_get_socket().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 21 May 2025 15:27:01 +0000 (16:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:23 +0000 (14:40 +0200)
commit7637a75aedf7db759eb049bb6138ee8ea04aaa64
treed6d731c50cdadcc334dccff0e91f583922d760b1
parent63d00b25e02b94ec2107df79798d0c97fc16701f
af_unix: Return struct unix_sock from unix_get_socket().

commit 5b17307bd0789edea0675d524a2b277b93bbde62 upstream.

Currently, unix_get_socket() returns struct sock, but after calling
it, we always cast it to unix_sk().

Let's return struct unix_sock from unix_get_socket().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240123170856.41348-4-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/af_unix.h
net/unix/garbage.c
net/unix/scm.c