Home
last modified time | relevance | path

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

123

/kernel/
Dpid.c46 struct pid init_struct_pid = {
103 void put_pid(struct pid *pid) in put_pid() argument
107 if (!pid) in put_pid()
110 ns = pid->numbers[pid->level].ns; in put_pid()
111 if (refcount_dec_and_test(&pid->count)) { in put_pid()
112 kmem_cache_free(ns->pid_cachep, pid); in put_pid()
120 struct pid *pid = container_of(rhp, struct pid, rcu); in delayed_put_pid() local
121 put_pid(pid); in delayed_put_pid()
124 void free_pid(struct pid *pid) in free_pid() argument
131 for (i = 0; i <= pid->level; i++) { in free_pid()
[all …]
Dexit.c270 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp()
300 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs()
320 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp()
723 if (unlikely(!tsk->pid)) in do_exit()
916 pid_t pid; member
925 struct pid *wo_pid;
977 pid_t pid = task_pid_vnr(p); in wait_task_zombie() local
1096 infop->pid = pid; in wait_task_zombie()
1100 return pid; in wait_task_zombie()
1139 pid_t pid; in wait_task_stopped() local
[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()
Dumh.c105 sub_info->pid = task_pid_nr(current); in call_usermodehelper_exec_async()
131 pid_t pid; in call_usermodehelper_exec_sync() local
135 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
136 if (pid < 0) { in call_usermodehelper_exec_sync()
137 sub_info->retval = pid; in call_usermodehelper_exec_sync()
150 kernel_wait4(pid, (int __user *)&ret, 0, NULL); in call_usermodehelper_exec_sync()
189 pid_t pid; in call_usermodehelper_exec_work() local
195 pid = kernel_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
197 if (pid < 0) { in call_usermodehelper_exec_work()
198 sub_info->retval = pid; in call_usermodehelper_exec_work()
[all …]
Dtaskstats.c53 pid_t pid; member
133 rc = genlmsg_unicast(&init_net, skb_cur, s->pid); in send_cpu_listeners()
183 static int fill_stats_for_pid(pid_t pid, struct taskstats *stats) in fill_stats_for_pid() argument
187 tsk = find_get_task_by_vpid(pid); in fill_stats_for_pid()
278 static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) in add_del_listener() argument
302 s->pid = pid; in add_del_listener()
308 if (s2->pid == pid && s2->valid) in add_del_listener()
326 if (s->pid == pid) { in add_del_listener()
359 static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid) in mk_reply() argument
372 if (nla_put(skb, type, sizeof(pid), &pid) < 0) { in mk_reply()
[all …]
Dsignal.c265 current->comm, current->pid, sig); in print_dropped_signal()
825 struct pid *sid; in check_kill_permission()
1418 int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp) in __kill_pgrp_info()
1433 int kill_pid_info(int sig, struct kernel_siginfo *info, struct pid *pid) in kill_pid_info() argument
1440 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info()
1455 static int kill_proc_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_proc_info() argument
1459 error = kill_pid_info(sig, info, find_vpid(pid)); in kill_proc_info()
1501 struct pid *pid, const struct cred *cred) in kill_pid_usb_asyncio() argument
1518 p = pid_task(pid, PIDTYPE_PID); in kill_pid_usb_asyncio()
1551 static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_something_info() argument
[all …]
Dfork.c1664 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) in init_task_pid() argument
1667 task->thread_pid = pid; in init_task_pid()
1669 task->signal->pids[type] = pid; in init_task_pid()
1687 struct pid *pidfd_pid(const struct file *file) in pidfd_pid()
1697 struct pid *pid = file->private_data; in pidfd_release() local
1700 put_pid(pid); in pidfd_release()
1708 struct pid *pid = f->private_data; in pidfd_show_fdinfo() local
1710 seq_put_decimal_ull(m, "Pid:\t", pid_nr_ns(pid, ns)); in pidfd_show_fdinfo()
1721 struct pid *pid = file->private_data; in pidfd_poll() local
1724 poll_wait(file, &pid->wait_pidfd, pts); in pidfd_poll()
[all …]
Daudit.c106 struct pid *pid; member
219 rc = (ac && ac->pid == task_tgid(task) ? 1 : 0); in auditd_test_task()
263 pid_t pid; in auditd_pid_vnr() local
268 if (!ac || !ac->pid) in auditd_pid_vnr()
269 pid = 0; in auditd_pid_vnr()
271 pid = pid_vnr(ac->pid); in auditd_pid_vnr()
274 return pid; in auditd_pid_vnr()
477 put_pid(ac->pid); in auditd_conn_free()
492 static int auditd_set(struct pid *pid, u32 portid, struct net *net) in auditd_set() argument
497 if (!pid || !net) in auditd_set()
[all …]
Dsys.c204 struct pid *pgrp; in SYSCALL_DEFINE3()
274 struct pid *pgrp; in SYSCALL_DEFINE2()
912 int pid; in SYSCALL_DEFINE0() local
915 pid = task_tgid_vnr(rcu_dereference(current->real_parent)); in SYSCALL_DEFINE0()
918 return pid; in SYSCALL_DEFINE0()
1008 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) in SYSCALL_DEFINE2() argument
1012 struct pid *pgrp; in SYSCALL_DEFINE2()
1015 if (!pid) in SYSCALL_DEFINE2()
1016 pid = task_pid_vnr(group_leader); in SYSCALL_DEFINE2()
1018 pgid = pid; in SYSCALL_DEFINE2()
[all …]
Dpid_namespace.c52 len = sizeof(struct pid) + level * sizeof(struct upid); in create_pid_cachep()
187 struct pid *pid; in zap_pid_ns_processes() local
217 idr_for_each_entry_continue(&pid_ns->idr, pid, nr) { in zap_pid_ns_processes()
218 task = pid_task(pid, PIDTYPE_PID); in zap_pid_ns_processes()
Dcompat.c212 COMPAT_SYSCALL_DEFINE3(sched_setaffinity, compat_pid_t, pid, in COMPAT_SYSCALL_DEFINE3() argument
226 retval = sched_setaffinity(pid, new_mask); in COMPAT_SYSCALL_DEFINE3()
232 COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len, in COMPAT_SYSCALL_DEFINE3() argument
246 ret = sched_getaffinity(pid, mask); in COMPAT_SYSCALL_DEFINE3()
Dfutex.c1065 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_state() local
1121 if (pid) in attach_to_pi_state()
1137 if (!pid) in attach_to_pi_state()
1153 if (pid != task_pid_vnr(pi_state->owner)) in attach_to_pi_state()
1273 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_owner() local
1284 if (!pid) in attach_to_pi_owner()
1286 p = find_get_task_by_vpid(pid); in attach_to_pi_owner()
3502 SYSCALL_DEFINE3(get_robust_list, int, pid, in SYSCALL_DEFINE3() argument
3516 if (!pid) in SYSCALL_DEFINE3()
3519 p = find_task_by_vpid(pid); in SYSCALL_DEFINE3()
[all …]
/kernel/trace/
Dtrace_functions_graph.c345 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 …]
Dblktrace.c66 static void trace_note(struct blk_trace *bt, pid_t pid, int action, in trace_note() argument
100 t->pid = pid; in trace_note()
124 trace_note(bt, tsk->pid, BLK_TN_PROCESS, tsk->comm, in trace_note_tsk()
184 pid_t pid) in act_log_check() argument
190 if (bt->pid && pid != bt->pid) in act_log_check()
223 pid_t pid; in __blk_add_trace() local
244 pid = tsk->pid; in __blk_add_trace()
245 if (act_log_check(bt, what, sector, pid)) in __blk_add_trace()
287 t->pid = pid; in __blk_add_trace()
543 bt->pid = buts->pid; in do_blk_trace_setup()
[all …]
Dtrace.c383 return !trace_find_filtered_pid(filtered_pids, task->pid); in trace_ignore_this_task()
407 if (!trace_find_filtered_pid(pid_list, self->pid)) in trace_filter_add_remove_task()
412 if (task->pid >= pid_list->pid_max) in trace_filter_add_remove_task()
417 set_bit(task->pid, pid_list->pids); in trace_filter_add_remove_task()
419 clear_bit(task->pid, pid_list->pids); in trace_filter_add_remove_task()
436 unsigned long pid = (unsigned long)v; in trace_pid_next() local
441 pid = find_next_bit(pid_list->pids, pid_list->pid_max, pid); in trace_pid_next()
444 if (pid < pid_list->pid_max) in trace_pid_next()
445 return (void *)(pid + 1); in trace_pid_next()
463 unsigned long pid; in trace_pid_start() local
[all …]
Dtrace_output.c483 trace_find_cmdline(entry->pid, comm); in lat_print_generic()
486 comm, entry->pid, cpu); in lat_print_generic()
574 trace_find_cmdline(entry->pid, comm); in trace_print_context()
576 trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid); in trace_print_context()
579 unsigned int tgid = trace_find_tgid(entry->pid); in trace_print_context()
624 trace_find_cmdline(entry->pid, comm); in trace_print_lat_context()
628 comm, entry->pid, iter->cpu, entry->flags, in trace_print_lat_context()
Dtrace_sched_wakeup.c390 entry->prev_pid = prev->pid; in tracing_sched_switch_trace()
393 entry->next_pid = next->pid; in tracing_sched_switch_trace()
418 entry->prev_pid = curr->pid; in tracing_sched_wakeup_trace()
421 entry->next_pid = wakee->pid; in tracing_sched_wakeup_trace()
/kernel/debug/kdb/
Dkdb_bt.c90 kdb_printf("Stack traceback for pid %d\n", p->pid); in kdb_bt1()
142 unsigned long pid; in kdb_bt() local
145 diag = kdbgetularg((char *)argv[1], &pid); in kdb_bt()
148 p = find_task_by_pid_ns(pid, &init_pid_ns); in kdb_bt()
153 kdb_printf("No process with pid == %ld found\n", pid); in kdb_bt()
Dkdb_cmds21 pid R
27 pid R
Dkdb_main.c1196 kdb_current, kdb_current ? kdb_current->pid : 0); in kdb_local()
1212 kdb_current, kdb_current->pid); in kdb_local()
2330 (void *)p, p->pid, p->parent->pid, in kdb_ps1()
2410 kdb_current_task->pid); in kdb_pid()
2452 long sig, pid; in kdb_kill() local
2468 pid = simple_strtol(argv[2], &endp, 0); in kdb_kill()
2471 if (pid <= 0) { in kdb_kill()
2477 p = find_task_by_pid_ns(pid, &init_pid_ns); in kdb_kill()
/kernel/sched/
Dcore.c3204 current->comm, current->pid, preempt_count())) in finish_task_switch()
3853 prev->comm, prev->pid, preempt_count()); in __schedule_bug()
3885 prev->comm, prev->pid, prev->non_block_count); in schedule_debug()
4670 static struct task_struct *find_process_by_pid(pid_t pid) in find_process_by_pid() argument
4672 return pid ? find_task_by_vpid(pid) : current; in find_process_by_pid()
5085 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) in do_sched_setscheduler() argument
5091 if (!param || pid < 0) in do_sched_setscheduler()
5098 p = find_process_by_pid(pid); in do_sched_setscheduler()
5164 SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param) in SYSCALL_DEFINE3() argument
5169 return do_sched_setscheduler(pid, policy, param); in SYSCALL_DEFINE3()
[all …]
/kernel/cgroup/
Dcgroup-v1.c335 int pid, n = 0; /* used for populating the array */ in pidlist_array_load() local
359 pid = task_tgid_vnr(tsk); in pidlist_array_load()
361 pid = task_pid_vnr(tsk); in pidlist_array_load()
362 if (pid > 0) /* make sure to only use valid results */ in pidlist_array_load()
363 array[n++] = pid; in pidlist_array_load()
404 int index = 0, pid = *pos; in cgroup_pidlist_start() local
430 if (pid) { in cgroup_pidlist_start()
435 if (l->list[mid] == pid) { in cgroup_pidlist_start()
438 } else if (l->list[mid] <= pid) in cgroup_pidlist_start()
/kernel/livepatch/
Dtransition.c253 __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/debug/
Dgdbstub.c730 int_to_threadref(thref, p->pid); in gdb_cmd_query()
746 ks->threadid = shadow_pid(current->pid); in gdb_cmd_query()
952 ks->kgdb_usethreadid = shadow_pid(kgdb_info[ks->cpu].task->pid); in gdb_serial_stub()
964 int_to_threadref(thref, shadow_pid(current->pid)); in gdb_serial_stub()
/kernel/time/
Dposix-timers.c405 static struct pid *good_sigevent(sigevent_t * event) in good_sigevent()
407 struct pid *pid = task_tgid(current); in good_sigevent() local
412 pid = find_vpid(event->sigev_notify_thread_id); in good_sigevent()
413 rtn = pid_task(pid, PIDTYPE_PID); in good_sigevent()
423 return pid; in good_sigevent()

123