• Home
  • Raw
  • Download

Lines Matching refs:task

321 static struct pid **task_pid_ptr(struct task_struct *task, enum pid_type type)  in task_pid_ptr()  argument
324 &task->thread_pid : in task_pid_ptr()
325 &task->signal->pids[type]; in task_pid_ptr()
331 void attach_pid(struct task_struct *task, enum pid_type type) in attach_pid() argument
333 struct pid *pid = *task_pid_ptr(task, type); in attach_pid()
334 hlist_add_head_rcu(&task->pid_links[type], &pid->tasks[type]); in attach_pid()
337 static void __change_pid(struct task_struct *task, enum pid_type type, in __change_pid() argument
340 struct pid **pid_ptr = task_pid_ptr(task, type); in __change_pid()
346 hlist_del_rcu(&task->pid_links[type]); in __change_pid()
356 void detach_pid(struct task_struct *task, enum pid_type type) in detach_pid() argument
358 __change_pid(task, type, NULL); in detach_pid()
361 void change_pid(struct task_struct *task, enum pid_type type, in change_pid() argument
364 __change_pid(task, type, pid); in change_pid()
365 attach_pid(task, type); in change_pid()
428 struct task_struct *task; in find_get_task_by_vpid() local
431 task = find_task_by_vpid(nr); in find_get_task_by_vpid()
432 if (task) in find_get_task_by_vpid()
433 get_task_struct(task); in find_get_task_by_vpid()
436 return task; in find_get_task_by_vpid()
439 struct pid *get_task_pid(struct task_struct *task, enum pid_type type) in get_task_pid() argument
443 pid = get_pid(rcu_dereference(*task_pid_ptr(task, type))); in get_task_pid()
493 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, in __task_pid_nr_ns() argument
501 nr = pid_nr_ns(rcu_dereference(*task_pid_ptr(task, type)), ns); in __task_pid_nr_ns()
565 struct task_struct *task; in pidfd_get_task() local
571 task = get_pid_task(pid, PIDTYPE_TGID); in pidfd_get_task()
573 if (!task) in pidfd_get_task()
577 return task; in pidfd_get_task()
669 static struct file *__pidfd_fget(struct task_struct *task, int fd) in __pidfd_fget() argument
674 ret = down_read_killable(&task->signal->exec_update_lock); in __pidfd_fget()
678 if (ptrace_may_access(task, PTRACE_MODE_ATTACH_REALCREDS)) in __pidfd_fget()
679 file = fget_task(task, fd); in __pidfd_fget()
683 up_read(&task->signal->exec_update_lock); in __pidfd_fget()
690 struct task_struct *task; in pidfd_getfd() local
694 task = get_pid_task(pid, PIDTYPE_PID); in pidfd_getfd()
695 if (!task) in pidfd_getfd()
698 file = __pidfd_fget(task, fd); in pidfd_getfd()
699 put_task_struct(task); in pidfd_getfd()