diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-07-04 09:32:42 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-07-04 09:32:42 +0200 |
| commit | 7a5b467e5d1a4b1968b590e3d09d895590a83ff6 (patch) | |
| tree | de4f99ff02c88682e94fb8bfa85c1762732e032a /include | |
| parent | 867673063e1da91cf960133f25d87e38fc790d7b (diff) | |
| parent | 861bdc6314a49520d9b3778b763461517c1321c0 (diff) | |
Merge patch series "allow to create pidfds for reaped tasks with SCM_PIDFD"
This is a logical continuation of the earlier work to create pidfds for
reaped tasks through the SO_PEERPIDFD socket option merged in
923ea4d4482b ("Merge patch series "net, pidfs: enable handing out pidfds
for reaped sk->sk_peer_pid"").
* patches from https://lore.kernel.org/20250703222314.309967-1-aleksandr.mikhalitsyn@canonical.com:
selftests: net: extend SCM_PIDFD test to cover stale pidfds
af_unix: enable handing out pidfds for reaped tasks in SCM_PIDFD
af_unix: stash pidfs dentry when needed
af_unix/scm: fix whitespace errors
af_unix: introduce and use scm_replace_pid() helper
af_unix: introduce unix_skb_to_scm helper
af_unix: rework unix_maybe_add_creds() to allow sleep
Link: https://lore.kernel.org/20250703222314.309967-1-aleksandr.mikhalitsyn@canonical.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/scm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/scm.h b/include/net/scm.h index 84c4707e78a5..c52519669349 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -69,7 +69,7 @@ static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_co static __inline__ void scm_set_cred(struct scm_cookie *scm, struct pid *pid, kuid_t uid, kgid_t gid) { - scm->pid = get_pid(pid); + scm->pid = get_pid(pid); scm->creds.pid = pid_vnr(pid); scm->creds.uid = uid; scm->creds.gid = gid; @@ -78,7 +78,7 @@ static __inline__ void scm_set_cred(struct scm_cookie *scm, static __inline__ void scm_destroy_cred(struct scm_cookie *scm) { put_pid(scm->pid); - scm->pid = NULL; + scm->pid = NULL; } static __inline__ void scm_destroy(struct scm_cookie *scm) |
