Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 59) sorted by relevance

123

/kernel/
Dpid.c46 struct pid init_struct_pid = INIT_STRUCT_PID;
141 static void set_last_pid(struct pid_namespace *pid_ns, int base, int pid) in set_last_pid() argument
147 last_write = cmpxchg(&pid_ns->last_pid, prev, pid); in set_last_pid()
148 } while ((prev != last_write) && (pid_before(base, last_write, pid))); in set_last_pid()
153 int i, offset, max_scan, pid, last = pid_ns->last_pid; in alloc_pidmap() local
156 pid = last + 1; in alloc_pidmap()
157 if (pid >= pid_max) in alloc_pidmap()
158 pid = RESERVED_PIDS; in alloc_pidmap()
159 offset = pid & BITS_PER_PAGE_MASK; in alloc_pidmap()
160 map = &pid_ns->pidmap[pid/BITS_PER_PAGE]; in alloc_pidmap()
[all …]
Dcapability.c116 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()
Dexit.c227 struct pid *session_of_pgrp(struct pid *pgrp) in session_of_pgrp()
230 struct pid *sid = NULL; in session_of_pgrp()
249 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp()
279 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs()
299 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp()
683 if (unlikely(!tsk->pid)) in do_exit()
916 struct pid *wo_pid;
927 struct pid *task_pid_type(struct task_struct *task, enum pid_type type) in task_pid_type()
931 return task->pids[type].pid; in task_pid_type()
968 pid_t pid, uid_t uid, int why, int status) in wait_noreap_copyout() argument
[all …]
Dtaskstats.c63 pid_t pid; member
152 rc = genlmsg_unicast(&init_net, skb_cur, s->pid); in send_cpu_listeners()
202 static int fill_stats_for_pid(pid_t pid, struct taskstats *stats) in fill_stats_for_pid() argument
207 tsk = find_task_by_vpid(pid); in fill_stats_for_pid()
288 static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) in add_del_listener() argument
312 s->pid = pid; in add_del_listener()
318 if (s2->pid == pid && s2->valid) in add_del_listener()
336 if (s->pid == pid) { in add_del_listener()
373 static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid) in mk_reply() argument
409 if (nla_put(skb, type, sizeof(pid), &pid) < 0) { in mk_reply()
[all …]
Dsignal.c230 current->comm, current->pid, sig); in print_dropped_signal()
777 struct pid *sid; in check_kill_permission()
1324 int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp) in __kill_pgrp_info()
1339 int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) in kill_pid_info() argument
1346 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info()
1363 int kill_proc_info(int sig, struct siginfo *info, pid_t pid) in kill_proc_info() argument
1367 error = kill_pid_info(sig, info, find_vpid(pid)); in kill_proc_info()
1383 int kill_pid_info_as_cred(int sig, struct siginfo *info, struct pid *pid, in kill_pid_info_as_cred() argument
1394 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info_as_cred()
1427 static int kill_something_info(int sig, struct siginfo *info, pid_t pid) in kill_something_info() argument
[all …]
Dkmod.c288 pid_t pid; in wait_for_helper() local
292 pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD); in wait_for_helper()
293 if (pid < 0) { in wait_for_helper()
294 sub_info->retval = pid; in wait_for_helper()
306 sys_wait4(pid, (int __user *)&ret, 0, NULL); in wait_for_helper()
327 pid_t pid; in __call_usermodehelper() local
333 pid = kernel_thread(wait_for_helper, sub_info, in __call_usermodehelper()
336 pid = kernel_thread(call_helper, sub_info, in __call_usermodehelper()
342 if (pid < 0) { in __call_usermodehelper()
343 sub_info->retval = pid; in __call_usermodehelper()
Dfork.c1208 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) in init_task_pid() argument
1210 task->pids[type].pid = pid; in init_task_pid()
1225 struct pid *pid, in copy_process() argument
1440 if (pid != &init_struct_pid) { in copy_process()
1442 pid = alloc_pid(p->nsproxy->pid_ns_for_children); in copy_process()
1443 if (!pid) in copy_process()
1481 p->pid = pid_nr(pid); in copy_process()
1492 p->tgid = p->pid; in copy_process()
1542 if (likely(p->pid)) { in copy_process()
1545 init_task_pid(p, PIDTYPE_PID, pid); in copy_process()
[all …]
Dsys.c178 struct pid *pgrp; in SYSCALL_DEFINE3()
248 struct pid *pgrp; in SYSCALL_DEFINE2()
844 int pid; in SYSCALL_DEFINE0() local
847 pid = task_tgid_vnr(rcu_dereference(current->real_parent)); in SYSCALL_DEFINE0()
850 return pid; in SYSCALL_DEFINE0()
914 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) in SYSCALL_DEFINE2() argument
918 struct pid *pgrp; in SYSCALL_DEFINE2()
921 if (!pid) in SYSCALL_DEFINE2()
922 pid = task_pid_vnr(group_leader); in SYSCALL_DEFINE2()
924 pgid = pid; in SYSCALL_DEFINE2()
[all …]
Dcompat.c537 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()
1085 COMPAT_SYSCALL_DEFINE6(move_pages, pid_t, pid, compat_ulong_t, nr_pages, in COMPAT_SYSCALL_DEFINE6() argument
[all …]
Dfutex_compat.c135 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()
Dkthread.c225 int pid; in create_kthread() local
231 pid = kernel_thread(kthread, create, CLONE_FS | CLONE_FILES | SIGCHLD); in create_kthread()
232 if (pid < 0) { in create_kthread()
240 create->result = ERR_PTR(pid); in create_kthread()
Dcgroup.c2341 pid_t pid; in __cgroup_procs_write() local
2344 if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0) in __cgroup_procs_write()
2353 if (pid) { in __cgroup_procs_write()
2354 tsk = find_task_by_vpid(pid); in __cgroup_procs_write()
3840 static pid_t pid_fry(pid_t pid) in pid_fry() argument
3842 unsigned a = pid & 0x55555555; in pid_fry()
3843 unsigned b = pid & 0xAAAAAAAA; in pid_fry()
3848 static pid_t cgroup_pid_fry(struct cgroup *cgrp, pid_t pid) in cgroup_pid_fry() argument
3851 return pid_fry(pid); in cgroup_pid_fry()
3853 return pid; in cgroup_pid_fry()
[all …]
Dfutex.c691 static struct task_struct * futex_find_get_task(pid_t pid) in futex_find_get_task() argument
696 p = find_task_by_vpid(pid); in futex_find_get_task()
818 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_state() local
842 if (pid) in attach_to_pi_state()
858 if (!pid) in attach_to_pi_state()
874 if (pid != task_pid_vnr(pi_state->owner)) in attach_to_pi_state()
889 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_owner() local
897 if (!pid) in attach_to_pi_owner()
899 p = futex_find_get_task(pid); in attach_to_pi_owner()
2769 SYSCALL_DEFINE3(get_robust_list, int, pid, in SYSCALL_DEFINE3() argument
[all …]
Dptrace.c1063 static struct task_struct *ptrace_get_task_struct(pid_t pid) in ptrace_get_task_struct() argument
1068 child = find_task_by_vpid(pid); in ptrace_get_task_struct()
1082 SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, in SYSCALL_DEFINE4() argument
1095 child = ptrace_get_task_struct(pid); in SYSCALL_DEFINE4()
1229 COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid, in COMPAT_SYSCALL_DEFINE4() argument
1240 child = ptrace_get_task_struct(pid); in COMPAT_SYSCALL_DEFINE4()
/kernel/time/
Dtimer_stats.c65 pid_t pid; member
132 (unsigned long)(entry)->pid ) & TSTAT_HASH_MASK)
159 entry1->pid == entry2->pid; in match_entries()
234 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()
Dposix-cpu-timers.c35 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()
288 const pid_t pid = CPUCLOCK_PID(which_clock); in posix_cpu_clock_get() local
291 if (pid == 0) { in posix_cpu_clock_get()
304 p = find_task_by_vpid(pid); in posix_cpu_clock_get()
322 const pid_t pid = CPUCLOCK_PID(new_timer->it_clock); in posix_cpu_timer_create() local
332 if (pid == 0) { in posix_cpu_timer_create()
335 p = find_task_by_vpid(pid); in posix_cpu_timer_create()
340 if (pid == 0) { in posix_cpu_timer_create()
[all …]
/kernel/debug/kdb/
Dkdb_bt.c89 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()
Dkdb_cmds21 pid R
27 pid R
/kernel/trace/
Dblktrace.c68 static void trace_note(struct blk_trace *bt, pid_t pid, int action, in trace_note() argument
100 t->pid = pid; in trace_note()
122 trace_note(bt, tsk->pid, BLK_TN_PROCESS, tsk->comm, in trace_note_tsk()
173 pid_t pid) in act_log_check() argument
179 if (bt->pid && pid != bt->pid) in act_log_check()
210 pid_t pid; in __blk_add_trace() local
225 pid = tsk->pid; in __blk_add_trace()
226 if (act_log_check(bt, what, sector, pid)) in __blk_add_trace()
268 t->pid = pid; in __blk_add_trace()
520 bt->pid = buts->pid; in do_blk_trace_setup()
[all …]
Dtrace_functions_graph.c510 print_graph_proc(struct trace_seq *s, pid_t pid) in print_graph_proc() argument
520 trace_find_cmdline(pid, comm); in print_graph_proc()
522 sprintf(pid_str, "%d", pid); in print_graph_proc()
562 verif_pid(struct trace_seq *s, pid_t pid, int cpu, struct fgraph_data *data) in verif_pid() argument
573 if (*last_pid == pid) in verif_pid()
577 *last_pid = pid; in verif_pid()
606 ret = print_graph_proc(s, pid); in verif_pid()
678 if (curr->ent.pid != next->ent.pid || in get_return_for_leaf()
702 enum trace_type type, int cpu, pid_t pid, u32 flags) in print_graph_irq() argument
728 ret = print_graph_proc(s, pid); in print_graph_irq()
[all …]
Dtrace_sched_switch.c40 entry->prev_pid = prev->pid; in tracing_sched_switch_trace()
43 entry->next_pid = next->pid; in tracing_sched_switch_trace()
96 entry->prev_pid = curr->pid; in tracing_sched_wakeup_trace()
99 entry->next_pid = wakee->pid; in tracing_sched_wakeup_trace()
Dftrace.c98 struct pid *pid; member
1054 static struct pid * const ftrace_swapper_pid = &init_struct_pid;
5012 static void clear_ftrace_pid(struct pid *pid) in clear_ftrace_pid() argument
5017 do_each_pid_task(pid, PIDTYPE_PID, p) { in clear_ftrace_pid()
5019 } while_each_pid_task(pid, PIDTYPE_PID, p); in clear_ftrace_pid()
5022 put_pid(pid); in clear_ftrace_pid()
5025 static void set_ftrace_pid(struct pid *pid) in set_ftrace_pid() argument
5030 do_each_pid_task(pid, PIDTYPE_PID, p) { in set_ftrace_pid()
5032 } while_each_pid_task(pid, PIDTYPE_PID, p); in set_ftrace_pid()
5036 static void clear_ftrace_pid_task(struct pid *pid) in clear_ftrace_pid_task() argument
[all …]
Dtrace.c984 max_data->pid = tsk->pid; in __update_max_tr()
1500 unsigned pid, idx; in trace_save_cmdline() local
1502 if (!tsk->pid || unlikely(tsk->pid > PID_MAX_DEFAULT)) in trace_save_cmdline()
1517 idx = savedcmd->map_pid_to_cmdline[tsk->pid]; in trace_save_cmdline()
1527 pid = savedcmd->map_cmdline_to_pid[idx]; in trace_save_cmdline()
1528 if (pid != NO_CMDLINE_MAP) in trace_save_cmdline()
1529 savedcmd->map_pid_to_cmdline[pid] = NO_CMDLINE_MAP; in trace_save_cmdline()
1531 savedcmd->map_cmdline_to_pid[idx] = tsk->pid; in trace_save_cmdline()
1532 savedcmd->map_pid_to_cmdline[tsk->pid] = idx; in trace_save_cmdline()
1545 static void __trace_find_cmdline(int pid, char comm[]) in __trace_find_cmdline() argument
[all …]
/kernel/rcu/
Dtiny.c72 current->pid, current->comm, in rcu_idle_enter_common()
73 idle->pid, idle->comm); /* must be idle task! */ in rcu_idle_enter_common()
133 current->pid, current->comm, in rcu_idle_exit_common()
134 idle->pid, idle->comm); /* must be idle task! */ in rcu_idle_exit_common()
/kernel/sched/
Dcore.c3057 prev->comm, prev->pid, preempt_count()); in __schedule_bug()
3670 static struct task_struct *find_process_by_pid(pid_t pid) in find_process_by_pid() argument
3672 return pid ? find_task_by_vpid(pid) : current; in find_process_by_pid()
4130 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) in do_sched_setscheduler() argument
4136 if (!param || pid < 0) in do_sched_setscheduler()
4143 p = find_process_by_pid(pid); in do_sched_setscheduler()
4230 SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, in SYSCALL_DEFINE3() argument
4237 return do_sched_setscheduler(pid, policy, param); in SYSCALL_DEFINE3()
4247 SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param) in SYSCALL_DEFINE2() argument
4249 return do_sched_setscheduler(pid, SETPARAM_POLICY, param); in SYSCALL_DEFINE2()
[all …]

123