Home
last modified time | relevance | path

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

123

/kernel/
Dpid.c48 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 …]
Dexit.c243 struct pid *thread_pid; in release_task()
327 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp()
357 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs()
377 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp()
946 if (unlikely(!tsk->pid)) in make_task_dead()
1042 pid_t pid; member
1051 struct pid *wo_pid;
1103 pid_t pid = task_pid_vnr(p); in wait_task_zombie() local
1223 infop->pid = pid; in wait_task_zombie()
1227 return pid; in wait_task_zombie()
[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()
Dtaskstats.c50 pid_t pid; member
131 rc = genlmsg_unicast(&init_net, skb_cur, s->pid); in send_cpu_listeners()
201 static int fill_stats_for_pid(pid_t pid, struct taskstats *stats) in fill_stats_for_pid() argument
205 tsk = find_get_task_by_vpid(pid); in fill_stats_for_pid()
296 static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) in add_del_listener() argument
320 s->pid = pid; in add_del_listener()
326 if (s2->pid == pid && s2->valid) in add_del_listener()
344 if (s->pid == pid) { in add_del_listener()
377 static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid) in mk_reply() argument
390 if (nla_put(skb, type, sizeof(pid), &pid) < 0) { in mk_reply()
[all …]
Dsignal.c268 current->comm, current->pid, sig); in print_dropped_signal()
845 struct pid *sid; in check_kill_permission()
1476 int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp) in __kill_pgrp_info()
1491 int kill_pid_info(int sig, struct kernel_siginfo *info, struct pid *pid) in kill_pid_info() argument
1498 p = pid_task(pid, PIDTYPE_PID); in kill_pid_info()
1513 static int kill_proc_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_proc_info() argument
1517 error = kill_pid_info(sig, info, find_vpid(pid)); in kill_proc_info()
1559 struct pid *pid, const struct cred *cred) in kill_pid_usb_asyncio() argument
1576 p = pid_task(pid, PIDTYPE_PID); in kill_pid_usb_asyncio()
1609 static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_something_info() argument
[all …]
Dumh.c132 pid_t pid; in call_usermodehelper_exec_sync() local
136 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, SIGCHLD); in call_usermodehelper_exec_sync()
137 if (pid < 0) in call_usermodehelper_exec_sync()
138 sub_info->retval = pid; in call_usermodehelper_exec_sync()
140 kernel_wait(pid, &sub_info->retval); in call_usermodehelper_exec_sync()
169 pid_t pid; in call_usermodehelper_exec_work() local
175 pid = user_mode_thread(call_usermodehelper_exec_async, sub_info, in call_usermodehelper_exec_work()
177 if (pid < 0) { in call_usermodehelper_exec_work()
178 sub_info->retval = pid; in call_usermodehelper_exec_work()
Dfork.c1907 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) in init_task_pid() argument
1910 task->thread_pid = pid; in init_task_pid()
1912 task->signal->pids[type] = pid; in init_task_pid()
1936 struct pid *pidfd_pid(const struct file *file) in pidfd_pid()
1946 struct pid *pid = file->private_data; in pidfd_release() local
1949 put_pid(pid); in pidfd_release()
1991 struct pid *pid = f->private_data; in pidfd_show_fdinfo() local
1995 if (likely(pid_has_task(pid, PIDTYPE_PID))) { in pidfd_show_fdinfo()
1997 nr = pid_nr_ns(pid, ns); in pidfd_show_fdinfo()
2012 for (i = ns->level + 1; i <= pid->level; i++) in pidfd_show_fdinfo()
[all …]
Daudit.c106 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()
481 put_pid(ac->pid); in auditd_conn_free()
498 static int auditd_set(struct pid *pid, u32 portid, struct net *net, in auditd_set() argument
505 if (!pid || !net) in auditd_set()
[all …]
Dsys.c219 struct pid *pgrp; in SYSCALL_DEFINE3()
289 struct pid *pgrp; in SYSCALL_DEFINE2()
972 int pid; in SYSCALL_DEFINE0() local
975 pid = task_tgid_vnr(rcu_dereference(current->real_parent)); in SYSCALL_DEFINE0()
978 return pid; in SYSCALL_DEFINE0()
1068 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) in SYSCALL_DEFINE2() argument
1072 struct pid *pgrp; in SYSCALL_DEFINE2()
1075 if (!pid) in SYSCALL_DEFINE2()
1076 pid = task_pid_vnr(group_leader); in SYSCALL_DEFINE2()
1078 pgid = pid; in SYSCALL_DEFINE2()
[all …]
Dpid_namespace.c50 len = sizeof(struct pid) + level * sizeof(struct upid); in create_pid_cachep()
172 struct pid *pid; in zap_pid_ns_processes() local
202 idr_for_each_entry_continue(&pid_ns->idr, pid, nr) { in zap_pid_ns_processes()
203 task = pid_task(pid, PIDTYPE_PID); in zap_pid_ns_processes()
Dcompat.c124 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/bpf/
Dtask_iter.c22 u32 pid; member
39 struct pid *pid; in task_group_seq_get_next() local
44 pid = find_pid_ns(common->pid, common->ns); in task_group_seq_get_next()
45 if (!pid) in task_group_seq_get_next()
48 task = get_pid_task(pid, PIDTYPE_TGID); in task_group_seq_get_next()
52 *tid = common->pid; in task_group_seq_get_next()
53 common->pid_visiting = common->pid; in task_group_seq_get_next()
63 pid = find_pid_ns(common->pid_visiting, common->ns); in task_group_seq_get_next()
64 task = get_pid_task(pid, PIDTYPE_PID); in task_group_seq_get_next()
69 pid = find_pid_ns(common->pid_visiting, common->ns); in task_group_seq_get_next()
[all …]
Dbpf_task_storage.c123 struct pid *pid; in bpf_pid_task_storage_lookup_elem() local
127 pid = pidfd_get_pid(fd, &f_flags); in bpf_pid_task_storage_lookup_elem()
128 if (IS_ERR(pid)) in bpf_pid_task_storage_lookup_elem()
129 return ERR_CAST(pid); in bpf_pid_task_storage_lookup_elem()
135 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_lookup_elem()
144 put_pid(pid); in bpf_pid_task_storage_lookup_elem()
147 put_pid(pid); in bpf_pid_task_storage_lookup_elem()
157 struct pid *pid; in bpf_pid_task_storage_update_elem() local
161 pid = pidfd_get_pid(fd, &f_flags); in bpf_pid_task_storage_update_elem()
162 if (IS_ERR(pid)) in bpf_pid_task_storage_update_elem()
[all …]
/kernel/trace/
Dpid_list.c93 static inline int pid_split(unsigned int pid, unsigned int *upper1, in pid_split() argument
100 if (unlikely(pid >= MAX_PID)) in pid_split()
103 *upper1 = (pid >> UPPER1_SHIFT) & UPPER_MASK; in pid_split()
104 *upper2 = (pid >> UPPER2_SHIFT) & UPPER_MASK; in pid_split()
105 *lower = pid & LOWER_MASK; in pid_split()
129 bool trace_pid_list_is_set(struct trace_pid_list *pid_list, unsigned int pid) in trace_pid_list_is_set() argument
142 if (pid_split(pid, &upper1, &upper2, &lower) < 0) in trace_pid_list_is_set()
168 int trace_pid_list_set(struct trace_pid_list *pid_list, unsigned int pid) in trace_pid_list_set() argument
181 if (pid_split(pid, &upper1, &upper2, &lower) < 0) in trace_pid_list_set()
221 int trace_pid_list_clear(struct trace_pid_list *pid_list, unsigned int pid) in trace_pid_list_clear() argument
[all …]
Dtrace_functions_graph.c343 static void print_graph_proc(struct trace_seq *s, pid_t pid) in print_graph_proc() argument
352 trace_find_cmdline(pid, comm); in print_graph_proc()
354 sprintf(pid_str, "%d", pid); in print_graph_proc()
383 verif_pid(struct trace_seq *s, pid_t pid, int cpu, struct fgraph_data *data) in verif_pid() argument
393 if (*last_pid == pid) in verif_pid()
397 *last_pid = pid; in verif_pid()
413 print_graph_proc(s, pid); in verif_pid()
477 if (curr->ent.pid != next->ent.pid || in get_return_for_leaf()
512 enum trace_type type, int cpu, pid_t pid, u32 flags) in print_graph_irq() argument
537 print_graph_proc(s, pid); in print_graph_irq()
[all …]
Dblktrace.c69 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()
180 trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n, cgid); in __blk_trace_note_message()
186 pid_t pid) in act_log_check() argument
192 if (bt->pid && pid != bt->pid) in act_log_check()
226 pid_t pid; in __blk_add_trace() local
248 pid = tsk->pid; in __blk_add_trace()
249 if (act_log_check(bt, what, sector, pid)) in __blk_add_trace()
291 t->pid = pid; in __blk_add_trace()
[all …]
Dtrace.c568 !trace_find_filtered_pid(filtered_pids, task->pid)) || in trace_ignore_this_task()
570 trace_find_filtered_pid(filtered_no_pids, task->pid)); in trace_ignore_this_task()
594 if (!trace_find_filtered_pid(pid_list, self->pid)) in trace_filter_add_remove_task()
600 trace_pid_list_set(pid_list, task->pid); in trace_filter_add_remove_task()
602 trace_pid_list_clear(pid_list, task->pid); in trace_filter_add_remove_task()
619 long pid = (unsigned long)v; in trace_pid_next() local
625 if (trace_pid_list_next(pid_list, pid, &next) < 0) in trace_pid_next()
628 pid = next; in trace_pid_next()
631 return (void *)(pid + 1); in trace_pid_next()
647 unsigned long pid; in trace_pid_start() local
[all …]
/kernel/debug/kdb/
Dkdb_bt.c86 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()
Dkdb_cmds21 pid R
27 pid R
/kernel/time/
Dposix-cpu-timers.c57 static struct pid *pid_for_clock(const clockid_t clock, bool gettime) in pid_for_clock()
61 struct pid *pid; in pid_for_clock() local
73 pid = find_vpid(upid); in pid_for_clock()
74 if (!pid) in pid_for_clock()
78 struct task_struct *tsk = pid_task(pid, PIDTYPE_PID); in pid_for_clock()
79 return (tsk && same_thread_group(tsk, current)) ? pid : NULL; in pid_for_clock()
88 if (gettime && (pid == task_pid(current))) in pid_for_clock()
94 return pid_has_task(pid, PIDTYPE_TGID) ? pid : NULL; in pid_for_clock()
115 return pid_task(timer->it.cpu.pid, clock_pid_type(timer->it_clock)); in cpu_timer_task_rcu()
390 struct pid *pid; in posix_cpu_timer_create() local
[all …]
/kernel/sched/
Dcore_sched.c129 int sched_core_share_pid(unsigned int cmd, pid_t pid, enum pid_type type, in sched_core_share_pid() argument
134 struct pid *grp; in sched_core_share_pid()
144 if (type > PIDTYPE_PGID || cmd >= PR_SCHED_CORE_MAX || pid < 0 || in sched_core_share_pid()
149 if (pid == 0) { in sched_core_share_pid()
152 task = find_task_by_vpid(pid); in sched_core_share_pid()
/kernel/futex/
Dsyscalls.c50 SYSCALL_DEFINE3(get_robust_list, int, pid, in SYSCALL_DEFINE3() argument
61 if (!pid) in SYSCALL_DEFINE3()
64 p = find_task_by_vpid(pid); in SYSCALL_DEFINE3()
323 COMPAT_SYSCALL_DEFINE3(get_robust_list, int, pid, in COMPAT_SYSCALL_DEFINE3() argument
334 if (!pid) in COMPAT_SYSCALL_DEFINE3()
337 p = find_task_by_vpid(pid); in COMPAT_SYSCALL_DEFINE3()
Dpi.c206 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_state() local
262 if (pid) in attach_to_pi_state()
278 if (!pid) in attach_to_pi_state()
294 if (pid != task_pid_vnr(pi_state->owner)) in attach_to_pi_state()
414 pid_t pid = uval & FUTEX_TID_MASK; in attach_to_pi_owner() local
424 if (!pid) in attach_to_pi_owner()
426 p = find_get_task_by_vpid(pid); in attach_to_pi_owner()
/kernel/livepatch/
Dtransition.c317 __func__, task->comm, task->pid); in klp_try_switch_task()
321 __func__, task->comm, task->pid); in klp_try_switch_task()
325 __func__, task->comm, task->pid, old_name); in klp_try_switch_task()
330 __func__, ret, task->comm, task->pid); in klp_try_switch_task()
/kernel/cgroup/
Dcgroup-v1.c332 int pid, n = 0; /* used for populating the array */ in pidlist_array_load() local
356 pid = task_tgid_vnr(tsk); in pidlist_array_load()
358 pid = task_pid_vnr(tsk); in pidlist_array_load()
359 if (pid > 0) /* make sure to only use valid results */ in pidlist_array_load()
360 array[n++] = pid; in pidlist_array_load()
401 int index = 0, pid = *pos; in cgroup_pidlist_start() local
426 if (pid) { in cgroup_pidlist_start()
431 if (l->list[mid] == pid) { in cgroup_pidlist_start()
434 } else if (l->list[mid] <= pid) in cgroup_pidlist_start()

123