diff options
author | Chen-Yu Tsai <wens@csie.org> | 2025-07-15 23:34:10 +0800 |
---|---|---|
committer | Chen-Yu Tsai <wens@csie.org> | 2025-07-15 23:34:10 +0800 |
commit | ca5ad734d30f30a577f705926d6e16a87513a2a7 (patch) | |
tree | b5fb169a86ac59892bd3b60c2df13e8a7cef360d /net/unix/af_unix.c | |
parent | 082c6a2d06c0831d236760a29953355845eee988 (diff) | |
parent | f99d4fccd2185176baf4ecac9a49d280fc62b953 (diff) |
Merge branch 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm into sunxi/dt-for-6.17
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 2e2e9997a68e..22e170fb5dda 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1971,7 +1971,8 @@ static void unix_maybe_add_creds(struct sk_buff *skb, const struct sock *sk, if (UNIXCB(skb).pid) return; - if (unix_may_passcred(sk) || unix_may_passcred(other)) { + if (unix_may_passcred(sk) || unix_may_passcred(other) || + !other->sk_socket) { UNIXCB(skb).pid = get_pid(task_tgid(current)); current_uid_gid(&UNIXCB(skb).uid, &UNIXCB(skb).gid); } |