Lines Matching refs:pid

7 #include <linux/pid.h>
26 * This function will print the pid that a given pidfd refers to in the
27 * pid namespace of the procfs instance.
28 * If the pid namespace of the process is not a descendant of the pid
29 * namespace of the procfs instance 0 will be shown as its pid. This is
31 * its pid namespace.
34 * If pid namespaces are supported then this function will also print
35 * the pid of a given pidfd refers to for all descendant pid namespaces
36 * starting from the current pid namespace of the instance, i.e. the
38 * If the pid namespace of the process is not a descendant of the pid
42 * /proc/<pid>/status where Pid and NSpid are always shown relative to
43 * the pid namespace of the procfs instance. The difference becomes
44 * obvious when sending around a pidfd between pid namespaces from a
46 * present between the pid namespaces:
47 * - create two new pid namespaces ns1 and ns2 in the initial pid
49 * new pid namespace and mount procfs)
57 struct pid *pid = pidfd_pid(f);
61 if (likely(pid_has_task(pid, PIDTYPE_PID))) {
63 nr = pid_nr_ns(pid, ns);
73 /* If nr is non-zero it means that 'pid' is valid and that
74 * ns, i.e. the pid namespace associated with the procfs
75 * instance, is in the pid namespace hierarchy of pid.
78 for (i = ns->level + 1; i <= pid->level; i++)
79 seq_put_decimal_ll(m, "\t", pid->numbers[i].nr);
91 struct pid *pid = pidfd_pid(file);
96 poll_wait(file, &pid->wait_pidfd, pts);
102 task = pid_task(pid, PIDTYPE_PID);
118 struct pid *pidfd_pid(const struct file *file)
134 static int pidfs_inum(struct pid *pid, unsigned long *ino)
153 static inline int pidfs_inum(struct pid *pid, unsigned long *ino)
155 *ino = pid->ino;
189 struct pid *pid = inode->i_private;
192 put_pid(pid);
205 struct pid *pid = inode->i_private;
207 return dynamic_dname(buffer, buflen, "pidfd:[%llu]", pid->ino);
233 struct pid *pid = data;
234 put_pid(pid);
262 struct file *pidfs_alloc_file(struct pid *pid, unsigned int flags)
269 ret = path_from_stashed(&pid->stashed, pidfs_mnt, get_pid(pid), &path);