/kernel/ |
D | pid.c | 46 struct pid init_struct_pid = INIT_STRUCT_PID; 144 static void set_last_pid(struct pid_namespace *pid_ns, int base, int pid) in set_last_pid() argument 150 last_write = cmpxchg(&pid_ns->last_pid, prev, pid); in set_last_pid() 151 } while ((prev != last_write) && (pid_before(base, last_write, pid))); in set_last_pid() 156 int i, offset, max_scan, pid, last = pid_ns->last_pid; in alloc_pidmap() local 159 pid = last + 1; in alloc_pidmap() 160 if (pid >= pid_max) in alloc_pidmap() 161 pid = RESERVED_PIDS; in alloc_pidmap() 162 offset = pid & BITS_PER_PAGE_MASK; in alloc_pidmap() 163 map = &pid_ns->pidmap[pid/BITS_PER_PAGE]; in alloc_pidmap() [all …]
|
D | capability.c | 117 static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, in cap_get_target_pid() argument 122 if (pid && (pid != task_pid_vnr(current))) { in cap_get_target_pid() 127 target = find_task_by_vpid(pid); in cap_get_target_pid() 152 pid_t pid; in SYSCALL_DEFINE2() local 160 if (get_user(pid, &header->pid)) in SYSCALL_DEFINE2() 163 if (pid < 0) in SYSCALL_DEFINE2() 166 ret = cap_get_target_pid(pid, &pE, &pI, &pP); in SYSCALL_DEFINE2() 230 pid_t pid; in SYSCALL_DEFINE2() local 236 if (get_user(pid, &header->pid)) in SYSCALL_DEFINE2() 240 if (pid != 0 && pid != task_pid_vnr(current)) in SYSCALL_DEFINE2()
|
D | exit.c | 303 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp() 333 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs() 353 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp() 747 if (unlikely(!tsk->pid)) in do_exit() 960 struct pid *wo_pid; 971 struct pid *task_pid_type(struct task_struct *task, enum pid_type type) in task_pid_type() 975 return task->pids[type].pid; in task_pid_type() 1012 pid_t pid, uid_t uid, int why, int status) in wait_noreap_copyout() argument 1028 retval = put_user(pid, &infop->si_pid); in wait_noreap_copyout() 1035 retval = pid; in wait_noreap_copyout() [all …]
|
D | taskstats.c | 67 pid_t pid; member 147 rc = genlmsg_unicast(&init_net, skb_cur, s->pid); in send_cpu_listeners() 197 static int fill_stats_for_pid(pid_t pid, struct taskstats *stats) in fill_stats_for_pid() argument 202 tsk = find_task_by_vpid(pid); in fill_stats_for_pid() 283 static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) in add_del_listener() argument 307 s->pid = pid; in add_del_listener() 313 if (s2->pid == pid && s2->valid) in add_del_listener() 331 if (s->pid == pid) { in add_del_listener() 364 static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid) in mk_reply() argument 377 if (nla_put(skb, type, sizeof(pid), &pid) < 0) { in mk_reply() [all …]
|
D | signal.c | 230 current->comm, current->pid, sig); in print_dropped_signal() 726 struct pid *sid; in check_kill_permission() 1283 int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp) in __kill_pgrp_info() 1298 int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) in kill_pid_info() argument 1305 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info() 1320 int kill_proc_info(int sig, struct siginfo *info, pid_t pid) in kill_proc_info() argument 1324 error = kill_pid_info(sig, info, find_vpid(pid)); in kill_proc_info() 1340 int kill_pid_info_as_cred(int sig, struct siginfo *info, struct pid *pid, in kill_pid_info_as_cred() argument 1351 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info_as_cred() 1384 static int kill_something_info(int sig, struct siginfo *info, pid_t pid) in kill_something_info() argument [all …]
|
D | kmod.c | 271 pid_t pid; in call_usermodehelper_exec_sync() local 275 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync() 276 if (pid < 0) { in call_usermodehelper_exec_sync() 277 sub_info->retval = pid; in call_usermodehelper_exec_sync() 290 sys_wait4(pid, (int __user *)&ret, 0, NULL); in call_usermodehelper_exec_sync() 329 pid_t pid; in call_usermodehelper_exec_work() local 335 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work() 337 if (pid < 0) { in call_usermodehelper_exec_work() 338 sub_info->retval = pid; in call_usermodehelper_exec_work()
|
D | fork.c | 1453 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) in init_task_pid() argument 1455 task->pids[type].pid = pid; in init_task_pid() 1471 struct pid *pid, in copy_process() argument 1683 if (pid != &init_struct_pid) { in copy_process() 1684 pid = alloc_pid(p->nsproxy->pid_ns_for_children); in copy_process() 1685 if (IS_ERR(pid)) { in copy_process() 1686 retval = PTR_ERR(pid); in copy_process() 1725 p->pid = pid_nr(pid); in copy_process() 1736 p->tgid = p->pid; in copy_process() 1794 if (unlikely(!(ns_of_pid(pid)->nr_hashed & PIDNS_HASH_ADDING))) { in copy_process() [all …]
|
D | sys.c | 183 struct pid *pgrp; in SYSCALL_DEFINE3() 253 struct pid *pgrp; in SYSCALL_DEFINE2() 851 int pid; in SYSCALL_DEFINE0() local 854 pid = task_tgid_vnr(rcu_dereference(current->real_parent)); in SYSCALL_DEFINE0() 857 return pid; in SYSCALL_DEFINE0() 921 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) in SYSCALL_DEFINE2() argument 925 struct pid *pgrp; in SYSCALL_DEFINE2() 928 if (!pid) in SYSCALL_DEFINE2() 929 pid = task_pid_vnr(group_leader); in SYSCALL_DEFINE2() 931 pgid = pid; in SYSCALL_DEFINE2() [all …]
|
D | compat.c | 537 compat_pid_t, pid, in COMPAT_SYSCALL_DEFINE4() argument 543 return sys_wait4(pid, stat_addr, options, NULL); in COMPAT_SYSCALL_DEFINE4() 551 ret = sys_wait4(pid, in COMPAT_SYSCALL_DEFINE4() 568 int, which, compat_pid_t, pid, in COMPAT_SYSCALL_DEFINE5() argument 580 ret = sys_waitid(which, pid, (siginfo_t __user *)&info, options, in COMPAT_SYSCALL_DEFINE5() 616 COMPAT_SYSCALL_DEFINE3(sched_setaffinity, compat_pid_t, pid, in COMPAT_SYSCALL_DEFINE3() argument 630 retval = sched_setaffinity(pid, new_mask); in COMPAT_SYSCALL_DEFINE3() 636 COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len, in COMPAT_SYSCALL_DEFINE3() argument 650 ret = sched_getaffinity(pid, mask); in COMPAT_SYSCALL_DEFINE3() 1087 COMPAT_SYSCALL_DEFINE6(move_pages, pid_t, pid, compat_ulong_t, nr_pages, in COMPAT_SYSCALL_DEFINE6() argument [all …]
|
D | futex_compat.c | 135 COMPAT_SYSCALL_DEFINE3(get_robust_list, int, pid, in COMPAT_SYSCALL_DEFINE3() argument 149 if (!pid) in COMPAT_SYSCALL_DEFINE3() 152 p = find_task_by_vpid(pid); in COMPAT_SYSCALL_DEFINE3()
|
D | futex.c | 858 static struct task_struct * futex_find_get_task(pid_t pid) in futex_find_get_task() argument 863 p = find_task_by_vpid(pid); in futex_find_get_task() 985 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_state() local 1009 if (pid) in attach_to_pi_state() 1025 if (!pid) in attach_to_pi_state() 1041 if (pid != task_pid_vnr(pi_state->owner)) in attach_to_pi_state() 1056 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_owner() local 1064 if (!pid) in attach_to_pi_owner() 1066 p = futex_find_get_task(pid); in attach_to_pi_owner() 3016 SYSCALL_DEFINE3(get_robust_list, int, pid, in SYSCALL_DEFINE3() argument [all …]
|
D | ptrace.c | 1101 static struct task_struct *ptrace_get_task_struct(pid_t pid) in ptrace_get_task_struct() argument 1106 child = find_task_by_vpid(pid); in ptrace_get_task_struct() 1120 SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, in SYSCALL_DEFINE4() argument 1133 child = ptrace_get_task_struct(pid); in SYSCALL_DEFINE4() 1269 COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid, in COMPAT_SYSCALL_DEFINE4() argument 1280 child = ptrace_get_task_struct(pid); in COMPAT_SYSCALL_DEFINE4()
|
D | cgroup.c | 2898 pid_t pid; in __cgroup_procs_write() local 2901 if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0) in __cgroup_procs_write() 2910 if (pid) { in __cgroup_procs_write() 2911 tsk = find_task_by_vpid(pid); in __cgroup_procs_write() 4557 static pid_t pid_fry(pid_t pid) in pid_fry() argument 4559 unsigned a = pid & 0x55555555; in pid_fry() 4560 unsigned b = pid & 0xAAAAAAAA; in pid_fry() 4565 static pid_t cgroup_pid_fry(struct cgroup *cgrp, pid_t pid) in cgroup_pid_fry() argument 4568 return pid_fry(pid); in cgroup_pid_fry() 4570 return pid; in cgroup_pid_fry() [all …]
|
/kernel/time/ |
D | timer_stats.c | 65 pid_t pid; member 132 (unsigned long)(entry)->pid ) & TSTAT_HASH_MASK) 159 entry1->pid == entry2->pid; in match_entries() 235 void timer_stats_update_stats(void *timer, pid_t pid, void *startf, in timer_stats_update_stats() argument 253 input.pid = pid; in timer_stats_update_stats() 311 entry->count, entry->pid, entry->comm); in tstats_show() 314 entry->count, entry->pid, entry->comm); in tstats_show()
|
D | posix-cpu-timers.c | 35 const pid_t pid = CPUCLOCK_PID(which_clock); in check_clock() local 40 if (pid == 0) in check_clock() 44 p = find_task_by_vpid(pid); in check_clock() 311 const pid_t pid = CPUCLOCK_PID(which_clock); in posix_cpu_clock_get() local 314 if (pid == 0) { in posix_cpu_clock_get() 327 p = find_task_by_vpid(pid); in posix_cpu_clock_get() 344 const pid_t pid = CPUCLOCK_PID(new_timer->it_clock); in posix_cpu_timer_create() local 354 if (pid == 0) { in posix_cpu_timer_create() 357 p = find_task_by_vpid(pid); in posix_cpu_timer_create() 362 if (pid == 0) { in posix_cpu_timer_create() [all …]
|
/kernel/debug/kdb/ |
D | kdb_bt.c | 89 kdb_printf("Stack traceback for pid %d\n", p->pid); in kdb_bt1() 141 unsigned long pid; in kdb_bt() local 144 diag = kdbgetularg((char *)argv[1], &pid); in kdb_bt() 147 p = find_task_by_pid_ns(pid, &init_pid_ns); in kdb_bt() 152 kdb_printf("No process with pid == %ld found\n", pid); in kdb_bt()
|
D | kdb_cmds | 21 pid R 27 pid R
|
D | kdb_main.c | 1184 kdb_current, kdb_current ? kdb_current->pid : 0); in kdb_local() 1200 kdb_current, kdb_current->pid); in kdb_local() 2317 (void *)p, p->pid, p->parent->pid, in kdb_ps1() 2397 kdb_current_task->pid); in kdb_pid() 2439 long sig, pid; in kdb_kill() local 2456 pid = simple_strtol(argv[2], &endp, 0); in kdb_kill() 2459 if (pid <= 0) { in kdb_kill() 2465 p = find_task_by_pid_ns(pid, &init_pid_ns); in kdb_kill() 2474 info.si_pid = pid; /* same capabilities as process being signalled */ in kdb_kill()
|
/kernel/trace/ |
D | trace_functions_graph.c | 563 static void print_graph_proc(struct trace_seq *s, pid_t pid) in print_graph_proc() argument 572 trace_find_cmdline(pid, comm); in print_graph_proc() 574 sprintf(pid_str, "%d", pid); in print_graph_proc() 602 verif_pid(struct trace_seq *s, pid_t pid, int cpu, struct fgraph_data *data) in verif_pid() argument 612 if (*last_pid == pid) in verif_pid() 616 *last_pid = pid; in verif_pid() 632 print_graph_proc(s, pid); in verif_pid() 696 if (curr->ent.pid != next->ent.pid || in get_return_for_leaf() 720 enum trace_type type, int cpu, pid_t pid, u32 flags) in print_graph_irq() argument 741 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 101 t->pid = pid; in trace_note() 123 trace_note(bt, tsk->pid, BLK_TN_PROCESS, tsk->comm, in trace_note_tsk() 175 pid_t pid) in act_log_check() argument 181 if (bt->pid && pid != bt->pid) in act_log_check() 214 pid_t pid; in __blk_add_trace() local 232 pid = tsk->pid; in __blk_add_trace() 233 if (act_log_check(bt, what, sector, pid)) in __blk_add_trace() 275 t->pid = pid; in __blk_add_trace() 534 bt->pid = buts->pid; in do_blk_trace_setup() [all …]
|
D | trace.c | 367 return !trace_find_filtered_pid(filtered_pids, task->pid); in trace_ignore_this_task() 391 if (!trace_find_filtered_pid(pid_list, self->pid)) in trace_filter_add_remove_task() 396 if (task->pid >= pid_list->pid_max) in trace_filter_add_remove_task() 401 set_bit(task->pid, pid_list->pids); in trace_filter_add_remove_task() 403 clear_bit(task->pid, pid_list->pids); in trace_filter_add_remove_task() 420 unsigned long pid = (unsigned long)v; in trace_pid_next() local 425 pid = find_next_bit(pid_list->pids, pid_list->pid_max, pid); in trace_pid_next() 428 if (pid < pid_list->pid_max) in trace_pid_next() 429 return (void *)(pid + 1); in trace_pid_next() 447 unsigned long pid; in trace_pid_start() local [all …]
|
D | trace_output.c | 443 trace_find_cmdline(entry->pid, comm); in lat_print_generic() 446 comm, entry->pid, cpu); in lat_print_generic() 535 trace_find_cmdline(entry->pid, comm); in trace_print_context() 537 trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid); in trace_print_context() 540 tgid = trace_find_tgid(entry->pid); in trace_print_context() 584 trace_find_cmdline(entry->pid, comm); in trace_print_lat_context() 588 comm, entry->pid, iter->cpu, entry->flags, in trace_print_lat_context()
|
D | trace_sched_wakeup.c | 386 entry->prev_pid = prev->pid; in tracing_sched_switch_trace() 389 entry->next_pid = next->pid; in tracing_sched_switch_trace() 414 entry->prev_pid = curr->pid; in tracing_sched_wakeup_trace() 417 entry->next_pid = wakee->pid; in tracing_sched_wakeup_trace()
|
/kernel/sched/ |
D | core.c | 2806 current->comm, current->pid, preempt_count())) in finish_task_switch() 3307 prev->comm, prev->pid, preempt_count()); in __schedule_bug() 3994 static struct task_struct *find_process_by_pid(pid_t pid) in find_process_by_pid() argument 3996 return pid ? find_task_by_vpid(pid) : current; in find_process_by_pid() 4478 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) in do_sched_setscheduler() argument 4484 if (!param || pid < 0) in do_sched_setscheduler() 4491 p = find_process_by_pid(pid); in do_sched_setscheduler() 4578 SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, in SYSCALL_DEFINE3() argument 4585 return do_sched_setscheduler(pid, policy, param); in SYSCALL_DEFINE3() 4595 SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param) in SYSCALL_DEFINE2() argument [all …]
|
/kernel/debug/ |
D | gdbstub.c | 729 int_to_threadref(thref, p->pid); in gdb_cmd_query() 745 ks->threadid = shadow_pid(current->pid); in gdb_cmd_query() 951 ks->kgdb_usethreadid = shadow_pid(kgdb_info[ks->cpu].task->pid); in gdb_serial_stub() 963 int_to_threadref(thref, shadow_pid(current->pid)); in gdb_serial_stub()
|