/kernel/ |
D | pid.c | 48 struct pid init_struct_pid = { 105 void put_pid(struct pid *pid) in put_pid() argument 109 if (!pid) in put_pid() 112 ns = pid->numbers[pid->level].ns; in put_pid() 113 if (refcount_dec_and_test(&pid->count)) { in put_pid() 114 kmem_cache_free(ns->pid_cachep, pid); in put_pid() 122 struct pid *pid = container_of(rhp, struct pid, rcu); in delayed_put_pid() local 123 put_pid(pid); in delayed_put_pid() 126 void free_pid(struct pid *pid) in free_pid() argument 133 for (i = 0; i <= pid->level; i++) { in free_pid() [all …]
|
D | exit.c | 234 struct pid *thread_pid; in release_task() 318 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp() 348 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs() 368 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp() 779 if (unlikely(!tsk->pid)) in do_exit() 1001 pid_t pid; member 1010 struct pid *wo_pid; 1062 pid_t pid = task_pid_vnr(p); in wait_task_zombie() local 1181 infop->pid = pid; in wait_task_zombie() 1185 return pid; in wait_task_zombie() [all …]
|
D | capability.c | 116 static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, in cap_get_target_pid() argument 121 if (pid && (pid != task_pid_vnr(current))) { in cap_get_target_pid() 126 target = find_task_by_vpid(pid); in cap_get_target_pid() 151 pid_t pid; in SYSCALL_DEFINE2() local 159 if (get_user(pid, &header->pid)) in SYSCALL_DEFINE2() 162 if (pid < 0) in SYSCALL_DEFINE2() 165 ret = cap_get_target_pid(pid, &pE, &pI, &pP); in SYSCALL_DEFINE2() 229 pid_t pid; in SYSCALL_DEFINE2() local 235 if (get_user(pid, &header->pid)) in SYSCALL_DEFINE2() 239 if (pid != 0 && pid != task_pid_vnr(current)) in SYSCALL_DEFINE2()
|
D | taskstats.c | 49 pid_t pid; member 129 rc = genlmsg_unicast(&init_net, skb_cur, s->pid); in send_cpu_listeners() 179 static int fill_stats_for_pid(pid_t pid, struct taskstats *stats) in fill_stats_for_pid() argument 183 tsk = find_get_task_by_vpid(pid); in fill_stats_for_pid() 274 static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) in add_del_listener() argument 298 s->pid = pid; in add_del_listener() 304 if (s2->pid == pid && s2->valid) in add_del_listener() 322 if (s->pid == pid) { in add_del_listener() 355 static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid) in mk_reply() argument 368 if (nla_put(skb, type, sizeof(pid), &pid) < 0) { in mk_reply() [all …]
|
D | signal.c | 268 current->comm, current->pid, sig); in print_dropped_signal() 834 struct pid *sid; in check_kill_permission() 1436 int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp) in __kill_pgrp_info() 1451 int kill_pid_info(int sig, struct kernel_siginfo *info, struct pid *pid) in kill_pid_info() argument 1458 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info() 1473 static int kill_proc_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_proc_info() argument 1477 error = kill_pid_info(sig, info, find_vpid(pid)); in kill_proc_info() 1519 struct pid *pid, const struct cred *cred) in kill_pid_usb_asyncio() argument 1536 p = pid_task(pid, PIDTYPE_PID); in kill_pid_usb_asyncio() 1569 static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_something_info() argument [all …]
|
D | umh.c | 129 pid_t pid; in call_usermodehelper_exec_sync() local 133 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync() 134 if (pid < 0) in call_usermodehelper_exec_sync() 135 sub_info->retval = pid; in call_usermodehelper_exec_sync() 137 kernel_wait(pid, &sub_info->retval); in call_usermodehelper_exec_sync() 166 pid_t pid; in call_usermodehelper_exec_work() local 172 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work() 174 if (pid < 0) { in call_usermodehelper_exec_work() 175 sub_info->retval = pid; in call_usermodehelper_exec_work()
|
D | fork.c | 1728 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) in init_task_pid() argument 1731 task->thread_pid = pid; in init_task_pid() 1733 task->signal->pids[type] = pid; in init_task_pid() 1756 struct pid *pidfd_pid(const struct file *file) in pidfd_pid() 1766 struct pid *pid = file->private_data; in pidfd_release() local 1769 put_pid(pid); in pidfd_release() 1811 struct pid *pid = f->private_data; in pidfd_show_fdinfo() local 1815 if (likely(pid_has_task(pid, PIDTYPE_PID))) { in pidfd_show_fdinfo() 1817 nr = pid_nr_ns(pid, ns); in pidfd_show_fdinfo() 1832 for (i = ns->level + 1; i <= pid->level; i++) in pidfd_show_fdinfo() [all …]
|
D | audit.c | 106 struct pid *pid; member 225 rc = (ac && ac->pid == task_tgid(task) ? 1 : 0); in auditd_test_task() 269 pid_t pid; in auditd_pid_vnr() local 274 if (!ac || !ac->pid) in auditd_pid_vnr() 275 pid = 0; in auditd_pid_vnr() 277 pid = pid_vnr(ac->pid); in auditd_pid_vnr() 280 return pid; in auditd_pid_vnr() 483 put_pid(ac->pid); in auditd_conn_free() 500 static int auditd_set(struct pid *pid, u32 portid, struct net *net, in auditd_set() argument 507 if (!pid || !net) in auditd_set() [all …]
|
D | sys.c | 213 struct pid *pgrp; in SYSCALL_DEFINE3() 283 struct pid *pgrp; in SYSCALL_DEFINE2() 945 int pid; in SYSCALL_DEFINE0() local 948 pid = task_tgid_vnr(rcu_dereference(current->real_parent)); in SYSCALL_DEFINE0() 951 return pid; in SYSCALL_DEFINE0() 1041 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) in SYSCALL_DEFINE2() argument 1045 struct pid *pgrp; in SYSCALL_DEFINE2() 1048 if (!pid) in SYSCALL_DEFINE2() 1049 pid = task_pid_vnr(group_leader); in SYSCALL_DEFINE2() 1051 pgid = pid; in SYSCALL_DEFINE2() [all …]
|
D | pid_namespace.c | 50 len = sizeof(struct pid) + level * sizeof(struct upid); in create_pid_cachep() 179 struct pid *pid; in zap_pid_ns_processes() local 209 idr_for_each_entry_continue(&pid_ns->idr, pid, nr) { in zap_pid_ns_processes() 210 task = pid_task(pid, PIDTYPE_PID); in zap_pid_ns_processes()
|
D | compat.c | 124 COMPAT_SYSCALL_DEFINE3(sched_setaffinity, compat_pid_t, pid, in COMPAT_SYSCALL_DEFINE3() argument 138 retval = sched_setaffinity(pid, new_mask); in COMPAT_SYSCALL_DEFINE3() 144 COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len, in COMPAT_SYSCALL_DEFINE3() argument 158 ret = sched_getaffinity(pid, mask); in COMPAT_SYSCALL_DEFINE3()
|
/kernel/debug/kdb/ |
D | kdb_bt.c | 86 kdb_printf("Stack traceback for pid %d\n", p->pid); in kdb_bt1() 162 unsigned long pid; in kdb_bt() local 165 diag = kdbgetularg((char *)argv[1], &pid); in kdb_bt() 168 p = find_task_by_pid_ns(pid, &init_pid_ns); in kdb_bt() 171 kdb_printf("No process with pid == %ld found\n", pid); in kdb_bt()
|
D | kdb_cmds | 21 pid R 27 pid R
|
/kernel/trace/ |
D | trace_functions_graph.c | 345 static void print_graph_proc(struct trace_seq *s, pid_t pid) in print_graph_proc() argument 354 trace_find_cmdline(pid, comm); in print_graph_proc() 356 sprintf(pid_str, "%d", pid); in print_graph_proc() 385 verif_pid(struct trace_seq *s, pid_t pid, int cpu, struct fgraph_data *data) in verif_pid() argument 395 if (*last_pid == pid) in verif_pid() 399 *last_pid = pid; in verif_pid() 415 print_graph_proc(s, pid); in verif_pid() 479 if (curr->ent.pid != next->ent.pid || in get_return_for_leaf() 514 enum trace_type type, int cpu, pid_t pid, u32 flags) in print_graph_irq() argument 539 print_graph_proc(s, pid); in print_graph_irq() [all …]
|
D | blktrace.c | 69 static void trace_note(struct blk_trace *bt, pid_t pid, int action, in trace_note() argument 102 t->pid = pid; in trace_note() 126 trace_note(bt, tsk->pid, BLK_TN_PROCESS, tsk->comm, in trace_note_tsk() 176 trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n, in __trace_note_message() 179 trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n, 0); in __trace_note_message() 186 pid_t pid) in act_log_check() argument 192 if (bt->pid && pid != bt->pid) in act_log_check() 225 pid_t pid; in __blk_add_trace() local 246 pid = tsk->pid; in __blk_add_trace() 247 if (act_log_check(bt, what, sector, pid)) in __blk_add_trace() [all …]
|
D | trace.c | 559 !trace_find_filtered_pid(filtered_pids, task->pid)) || in trace_ignore_this_task() 561 trace_find_filtered_pid(filtered_no_pids, task->pid)); in trace_ignore_this_task() 585 if (!trace_find_filtered_pid(pid_list, self->pid)) in trace_filter_add_remove_task() 590 if (task->pid >= pid_list->pid_max) in trace_filter_add_remove_task() 595 set_bit(task->pid, pid_list->pids); in trace_filter_add_remove_task() 597 clear_bit(task->pid, pid_list->pids); in trace_filter_add_remove_task() 614 unsigned long pid = (unsigned long)v; in trace_pid_next() local 619 pid = find_next_bit(pid_list->pids, pid_list->pid_max, pid); in trace_pid_next() 622 if (pid < pid_list->pid_max) in trace_pid_next() 623 return (void *)(pid + 1); in trace_pid_next() [all …]
|
D | trace_output.c | 498 trace_find_cmdline(entry->pid, comm); in lat_print_generic() 501 comm, entry->pid, cpu); in lat_print_generic() 589 trace_find_cmdline(entry->pid, comm); in trace_print_context() 591 trace_seq_printf(s, "%16s-%-7d ", comm, entry->pid); in trace_print_context() 594 unsigned int tgid = trace_find_tgid(entry->pid); in trace_print_context() 636 trace_find_cmdline(entry->pid, comm); in trace_print_lat_context() 640 comm, entry->pid, iter->cpu, entry->flags, in trace_print_lat_context()
|
D | trace_sched_wakeup.c | 392 entry->prev_pid = prev->pid; in tracing_sched_switch_trace() 395 entry->next_pid = next->pid; in tracing_sched_switch_trace() 420 entry->prev_pid = curr->pid; in tracing_sched_wakeup_trace() 423 entry->next_pid = wakee->pid; in tracing_sched_wakeup_trace()
|
/kernel/bpf/ |
D | task_iter.c | 29 struct pid *pid; in task_seq_get_next() local 33 pid = find_ge_pid(*tid, ns); in task_seq_get_next() 34 if (pid) { in task_seq_get_next() 35 *tid = pid_nr_ns(pid, ns); in task_seq_get_next() 36 task = get_pid_task(pid, PIDTYPE_PID); in task_seq_get_next() 40 } else if (skip_if_dup_files && task->tgid != task->pid && in task_seq_get_next()
|
/kernel/time/ |
D | posix-cpu-timers.c | 50 static struct pid *pid_for_clock(const clockid_t clock, bool gettime) in pid_for_clock() 54 struct pid *pid; in pid_for_clock() local 66 pid = find_vpid(upid); in pid_for_clock() 67 if (!pid) in pid_for_clock() 71 struct task_struct *tsk = pid_task(pid, PIDTYPE_PID); in pid_for_clock() 72 return (tsk && same_thread_group(tsk, current)) ? pid : NULL; in pid_for_clock() 81 if (gettime && (pid == task_pid(current))) in pid_for_clock() 87 return pid_has_task(pid, PIDTYPE_TGID) ? pid : NULL; in pid_for_clock() 108 return pid_task(timer->it.cpu.pid, clock_pid_type(timer->it_clock)); in cpu_timer_task_rcu() 381 struct pid *pid; in posix_cpu_timer_create() local [all …]
|
/kernel/cgroup/ |
D | cgroup-v1.c | 333 int pid, n = 0; /* used for populating the array */ in pidlist_array_load() local 357 pid = task_tgid_vnr(tsk); in pidlist_array_load() 359 pid = task_pid_vnr(tsk); in pidlist_array_load() 360 if (pid > 0) /* make sure to only use valid results */ in pidlist_array_load() 361 array[n++] = pid; in pidlist_array_load() 402 int index = 0, pid = *pos; in cgroup_pidlist_start() local 427 if (pid) { in cgroup_pidlist_start() 432 if (l->list[mid] == pid) { in cgroup_pidlist_start() 435 } else if (l->list[mid] <= pid) in cgroup_pidlist_start()
|
/kernel/sched/ |
D | core.c | 3856 current->comm, current->pid, preempt_count())) in finish_task_switch() 4522 prev->comm, prev->pid, preempt_count()); in __schedule_bug() 4557 prev->comm, prev->pid, prev->non_block_count); in schedule_debug() 5414 static struct task_struct *find_process_by_pid(pid_t pid) in find_process_by_pid() argument 5416 return pid ? find_task_by_vpid(pid) : current; in find_process_by_pid() 5863 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) in do_sched_setscheduler() argument 5869 if (!param || pid < 0) in do_sched_setscheduler() 5876 p = find_process_by_pid(pid); in do_sched_setscheduler() 5947 SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param) in SYSCALL_DEFINE3() argument 5952 return do_sched_setscheduler(pid, policy, param); in SYSCALL_DEFINE3() [all …]
|
/kernel/bpf/preload/ |
D | bpf_preload_kern.c | 54 struct pid *tgid; in finish() 86 struct pid *tgid; in fini_umd()
|
/kernel/livepatch/ |
D | transition.c | 253 __func__, task->comm, task->pid); in klp_check_stack() 266 __func__, task->comm, task->pid, in klp_check_stack() 312 task->pid); in klp_try_switch_task()
|
/kernel/futex/ |
D | core.c | 1019 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_state() local 1075 if (pid) in attach_to_pi_state() 1091 if (!pid) in attach_to_pi_state() 1107 if (pid != task_pid_vnr(pi_state->owner)) in attach_to_pi_state() 1228 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_owner() local 1239 if (!pid) in attach_to_pi_owner() 1241 p = find_get_task_by_vpid(pid); in attach_to_pi_owner() 3379 SYSCALL_DEFINE3(get_robust_list, int, pid, in SYSCALL_DEFINE3() argument 3393 if (!pid) in SYSCALL_DEFINE3() 3396 p = find_task_by_vpid(pid); in SYSCALL_DEFINE3() [all …]
|