Lines Matching defs:pid

257 				current->comm, current->pid, sig);
834 struct pid *sid;
1218 /* Should SIGKILL or SIGSTOP be received by a pid namespace init? */
1222 /* Force if sent from an ancestor pid namespace */
1242 /* From an ancestor pid namespace? */
1461 int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp)
1482 struct pid *pid, enum pid_type type)
1489 p = pid_task(pid, PIDTYPE_PID);
1503 int kill_pid_info(int sig, struct kernel_siginfo *info, struct pid *pid)
1505 return kill_pid_info_type(sig, info, pid, PIDTYPE_TGID);
1508 static int kill_proc_info(int sig, struct kernel_siginfo *info, pid_t pid)
1512 error = kill_pid_info(sig, info, find_vpid(pid));
1554 struct pid *pid, const struct cred *cred)
1571 p = pid_task(pid, PIDTYPE_PID);
1598 * kill_something_info() interprets pid in interesting ways just like kill(2).
1604 static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)
1608 if (pid > 0)
1609 return kill_proc_info(sig, info, pid);
1612 if (pid == INT_MIN)
1616 if (pid != -1) {
1618 pid ? find_vpid(-pid) : task_pgrp(current));
1906 static int kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp)
1915 int kill_pgrp(struct pid *pid, int sig, int priv)
1917 return kill_pgrp_info(sig, __si_special(priv), pid);
1921 int kill_pid(struct pid *pid, int sig, int priv)
1923 return kill_pid_info(sig, __si_special(priv), pid);
1966 int send_sigqueue(struct sigqueue *q, struct pid *pid, enum pid_type type)
1990 t = pid_task(pid, type);
2032 struct pid *pid = task_pid(task);
2036 __wake_up(&pid->wait_pidfd, TASK_NORMAL, 0,
2085 * task_active_pid_ns will always return the same pid namespace
3821 * @pid: the PID of the process
3824 SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
3830 return kill_something_info(sig, &info, pid);
3834 * Verify that the signaler and signalee either are in the same pid namespace
3835 * or that the signaler's pid namespace is an ancestor of the signalee's pid
3838 static bool access_pidfd_pidns(struct pid *pid)
3841 struct pid_namespace *p = ns_of_pid(pid);
3870 static struct pid *pidfd_to_pid(const struct file *file)
3872 struct pid *pid;
3874 pid = pidfd_pid(file);
3875 if (!IS_ERR(pid))
3876 return pid;
3904 struct pid *pid;
3921 pid = pidfd_to_pid(f.file);
3922 if (IS_ERR(pid)) {
3923 ret = PTR_ERR(pid);
3928 if (!access_pidfd_pidns(pid))
3961 if ((task_pid(current) != pid || type > PIDTYPE_TGID) &&
3969 ret = kill_pgrp_info(sig, &kinfo, pid);
3971 ret = kill_pid_info_type(sig, &kinfo, pid, type);
3978 do_send_specific(pid_t tgid, pid_t pid, int sig, struct kernel_siginfo *info)
3984 p = find_task_by_vpid(pid);
4007 static int do_tkill(pid_t tgid, pid_t pid, int sig)
4013 return do_send_specific(tgid, pid, sig, &info);
4019 * @pid: the PID of the thread
4026 SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig)
4029 if (pid <= 0 || tgid <= 0)
4032 return do_tkill(tgid, pid, sig);
4037 * @pid: the PID of the task
4042 SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig)
4045 if (pid <= 0)
4048 return do_tkill(0, pid, sig);
4051 static int do_rt_sigqueueinfo(pid_t pid, int sig, kernel_siginfo_t *info)
4057 (task_pid_vnr(current) != pid))
4061 return kill_proc_info(sig, info, pid);
4066 * @pid: the PID of the thread
4070 SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
4077 return do_rt_sigqueueinfo(pid, sig, &info);
4082 compat_pid_t, pid,
4090 return do_rt_sigqueueinfo(pid, sig, &info);
4094 static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, kernel_siginfo_t *info)
4097 if (pid <= 0 || tgid <= 0)
4104 (task_pid_vnr(current) != pid))
4107 return do_send_specific(tgid, pid, sig, info);
4110 SYSCALL_DEFINE4(rt_tgsigqueueinfo, pid_t, tgid, pid_t, pid, int, sig,
4117 return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
4123 compat_pid_t, pid,
4131 return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
4892 sig, t->pid);
4894 kdb_printf("Signal %d is sent to process %d.\n", sig, t->pid);