Defined in 2 files as a member:
Defined in 2 files as a function:
- include/linux/pid.h, line 216 (as a function)
- tools/sched_ext/scx_userland.c, line 150 (as a function)
Referenced in 34 files:
- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c, line 424
- drivers/gpu/drm/msm/msm_gem_submit.c, line 70
- drivers/gpu/drm/msm/msm_gpu.c, line 879
- drivers/net/tun.c, line 3524
- drivers/s390/char/fs3270.c, line 455
- drivers/tty/tty_io.c, line 2205
- drivers/tty/vt/vt_ioctl.c
- drivers/usb/core/devio.c
- fs/fuse/req.c, line 13
- fs/gfs2/glock.c
- fs/gfs2/glock.h, line 160
- fs/locks.c, line 595
- fs/notify/dnotify/dnotify.c, line 369
- fs/notify/fanotify/fanotify.c, line 844
- fs/ocfs2/dlmglue.c
- fs/pidfs.c, line 732
- fs/proc/array.c
- include/linux/mm.h
- include/linux/sched/signal.h, line 674
- init/main.c, line 1653
- io_uring/sqpoll.c
- ipc/msg.c, line 833
- kernel/exit.c
- kernel/kcsan/report.c
- kernel/pid.c, line 577
- kernel/signal.c
- kernel/sys.c
- kernel/time/posix-cpu-timers.c
- sound/core/control.c
- sound/core/pcm.c, line 971
- sound/core/rawmidi.c, line 358
- sound/core/seq/seq_clientmgr.c, line 353
- tools/sched_ext/scx_userland.c, line 271
- virt/kvm/kvm_main.c, line 4473
Smatch caller information:
drivers/tty/tty_io.c __tty_fasync() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tty->ctrl.lock | ||
| LOCK2 | &tty->legacy_mutex | ||
| LOCK2 | flags | ||
| TYPE_LOCK | (struct tty_struct)->ctrl.lock | ||
| TYPE_LOCK | (struct tty_struct)->legacy_mutex |
kernel/exit.c __unhash_process() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| PARAM_VALUE | 0 | task->thread_pid | 4096-ptr_max |
| CAPPED_DATA | 0 | task | 1 |
| DATA_SOURCE | 0 | task | $1 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &sig->stats_lock.lock | ||
| LOCK2 | &sighand->siglock | ||
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq | ||
| TYPE_LOCK | (struct seqlock)->lock | ||
| TYPE_LOCK | (struct sighand_struct)->siglock |
kernel/exit.c find_new_reaper() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| CAPPED_DATA | 0 | task | 1 |
| CAPPED_DATA | 0 | task->cgroups | 1 |
| CAPPED_DATA | 0 | task->sched_class | 1 |
| DATA_SOURCE | 0 | task | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 0 | task->dl.pi_se->runtime | 1-17592186044415[c] |
| USER_DATA | 0 | task->exit_code | 0,256-65280[c] |
| USER_DATA | 0 | task->signal->group_exit_code | 0,256-65280[c] |
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq | ||
| HALF_LOCKED2 | global &system_transition_mutex |
kernel/exit.c find_new_reaper() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq | ||
| HALF_LOCKED2 | global &system_transition_mutex |
kernel/exit.c find_new_reaper() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq | ||
| HALF_LOCKED2 | global &system_transition_mutex |
kernel/exit.c release_task() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| PARAM_VALUE | 0 | task->thread_pid | 4096-ptr_max |
| DATA_SOURCE | 0 | task | $0 [m] |
| RX_PATH | |||
| TASK_NOT_RUNNING |
kernel/exit.c task_pid_type() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| BUF_SIZE | 0 | task | (-1),16,24 |
| BUF_SIZE | 0 | task | (-1),16,24 |
| DATA_SOURCE | 0 | task | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
drivers/usb/core/devio.c usbdev_open() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &dev->dev.mutex | ||
| TYPE_LOCK | (struct device)->mutex |
sound/core/rawmidi.c open_substream() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &rmidi->open_mutex | ||
| LOCK2 | &substream->lock | ||
| LOCK2 | irq | ||
| TYPE_LOCK | (struct snd_rawmidi)->open_mutex | ||
| TYPE_LOCK | (struct snd_rawmidi_substream)->lock |
fs/gfs2/xattr.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &gl->gl_lockref.lock | ||
| TYPE_LOCK | (struct lockref)->lock |
fs/gfs2/glock.c __gfs2_holder_init() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/gfs2/glock.c gfs2_holder_reinit() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &fp->f_fl_mutex |
fs/pidfs.c pidfs_exit() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| DATA_SOURCE | 0 | task | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
drivers/tty/vt/vt_ioctl.c vt_ioctl() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| LOCK2 | global &console_sem |
drivers/tty/vt/vt_ioctl.c vt_k_ioctl() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| CAPABLE | 0 | 5 | |
| PREEMPT_ADD | <- disables preempt | ||
| LOCK2 | global &vt_spawn_con.lock | ||
| LOCK2 | irq | ||
| TYPE_LOCK | (struct vt_spawn_console)->lock |
drivers/tty/vt/vt_ioctl.c vt_setactivate() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| LOCK2 | global &console_sem |
kernel/time/posix-cpu-timers.c pid_for_clock() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| LOCK2 | rcu_read |
kernel/time/posix-cpu-timers.c pid_for_clock() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| LOCK2 | rcu_read |
sound/core/pcm.c snd_pcm_attach_substream() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &pcm->open_mutex | ||
| TYPE_LOCK | (struct snd_pcm)->open_mutex |
drivers/gpu/drm/msm/msm_gem_submit.c submit_create() -> task_pid()
| Type | Parameter | Key | Value |
|---|
fs/proc/array.c get_children_pid() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &seq->lock | ||
| LOCK2 | global &tasklist_lock | ||
| TYPE_LOCK | (struct seq_file)->lock |
fs/proc/array.c get_children_pid() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| CAPPED_DATA | 0 | &task->sibling | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &seq->lock | ||
| LOCK2 | global &tasklist_lock | ||
| TYPE_LOCK | (struct seq_file)->lock |
fs/gfs2/acl.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &gl->gl_lockref.lock | ||
| TYPE_LOCK | (struct lockref)->lock |
ipc/msg.c pipelined_send() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | |||
| LOCK2 | &msq->q_perm.lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct kern_ipc_perm)->lock |
fs/gfs2/rgrp.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &gl->gl_lockref.lock | ||
| TYPE_LOCK | (struct lockref)->lock |
init/main.c kernel_init_freeable() -> task_pid()
| Type | Parameter | Key | Value |
|---|
fs/notify/dnotify/dnotify.c fcntl_dirnotify() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| LOCK2 | global &dnotify_group->mark_mutex | ||
| HALF_LOCKED2 | &fsn_mark->lock | ||
| HALF_LOCKED2 | &new_fsn_mark->lock | ||
| TYPE_LOCK | (struct fsnotify_group)->mark_mutex | ||
| TYPE_LOCK | (struct fsnotify_mark)->lock |
kernel/pid.c task_active_pid_ns() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| BUF_SIZE | 0 | task | (-1)-s32max |
| BUF_SIZE | 0 | task | (-1)-s32max |
| BUF_SIZE | 0 | task->group_leader | (-1)-s32max |
| BUF_SIZE | 0 | task->mempolicy | (-1)-s32max |
| DATA_SOURCE | 0 | task | $0 |
| STR_LEN | 0 | task | (-1),6,10,15,21,25,32,35 |
| STR_LEN | 0 | task | (-1),6,10,15,21,25,32,35 |
| NOSPEC | 0 | task->thread.fsbase | |
| NOSPEC | 0 | task->thread.gsbase | |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 0 | task->dl.pi_se->runtime | 1-17592186044415[c] |
| USER_DATA | 0 | task->exit_code | 0,256-65280[c] |
| USER_DATA | 0 | task->exit_signal | 1-64[c] |
| USER_DATA | 0 | task->group_leader->thread.fsbase | 0-s32max[c] |
| USER_DATA | 0 | task->group_leader->thread.gsbase | 0-s32max[c] |
| USER_DATA | 0 | task->parent->exit_code | 0,256-65280[c] |
| USER_DATA | 0 | task->ptrace | 65537,65545-33619953[c] |
| USER_DATA | 0 | task->real_parent->exit_code | 0,256-65280[c] |
| USER_DATA | 0 | task->signal->group_exit_code | 0,256-65280[c] |
| USER_DATA | 0 | task->thread.fsbase | 0-s32max[c] |
| USER_DATA | 0 | task->thread.gsbase | 0-s32max[c] |
| NO_OVERFLOW_SIMPLE | 0 | task->dl.pi_se->dl_runtime | |
| NO_OVERFLOW_SIMPLE | 0 | task->nsproxy->pid_ns_for_children->pid_cachep->object_size | |
| UNITS | 0 | task | unit_byte |
| HALF_LOCKED2 | &_T->lock->alloc_lock | ||
| HALF_LOCKED2 | &cgrp->pidlist_mutex | ||
| HALF_LOCKED2 | &m->lock | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &p->mutex | ||
| HALF_LOCKED2 | &s->lock | ||
| HALF_LOCKED2 | &seq->lock | ||
| HALF_LOCKED2 | global &acct_on_mutex | ||
| HALF_LOCKED2 | global &audit_cmd_mutex.lock | ||
| HALF_LOCKED2 | global &sysctl_lock | ||
| HALF_LOCKED2 | global &tasklist_lock | ||
| HALF_LOCKED2 | irq | ||
| HALF_LOCKED2 | rcu_read | ||
| HALF_LOCKED2 | 0 | &task->alloc_lock | |
| HALF_LOCKED2 | 0 | &task->sighand->siglock | |
| HALF_LOCKED2 | 0 | &task->signal->exec_update_lock |
fs/gfs2/bmap.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &gl->gl_lockref.lock | ||
| HALF_LOCKED2 | &inode->i_rwsem | ||
| HALF_LOCKED2 | &ip->i_rw_mutex | ||
| HALF_LOCKED2 | &sdp->sd_log_flush_lock | ||
| TYPE_LOCK | (struct lockref)->lock |
kernel/sched/build_utility.c task_pid_type() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| DATA_SOURCE | 0 | task | $0 |
| LOCK2 | global &tasklist_lock |
fs/fuse/req.c fuse_fill_creds() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &fc->killsb |
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c etnaviv_ioctl_gem_submit() -> task_pid()
| Type | Parameter | Key | Value |
|---|
fs/notify/fanotify/fanotify.c fanotify_alloc_event() -> task_pid()
| Type | Parameter | Key | Value |
|---|
drivers/gpu/drm/msm/msm_gpu.c msm_gpu_create_private_vm() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| DATA_SOURCE | 0 | task | $1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | _T->lock |
sound/core/control.c snd_ctl_get_preferred_subdevice() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | _T->flags | ||
| LOCK2 | _T->lock | ||
| HALF_LOCKED2 | &pcm->open_mutex | ||
| HALF_LOCKED2 | &rmidi->open_mutex |
sound/core/control.c snd_ctl_open() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/locks.c lease_setup() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &ctx->flc_lock | ||
| HALF_LOCKED2 | &inode->i_rwsem | ||
| TYPE_LOCK | (struct file_lock_context)->flc_lock |
kernel/signal.c do_notify_pidfd() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| CAPPED_DATA | 0 | task | 1 |
| DATA_SOURCE | 0 | task | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 0 | task->dl.pi_se->runtime | 1-17592186044415[c] |
| USER_DATA | 0 | task->exit_code | 0-64,256-65280[c] |
| USER_DATA | 0 | task->signal->group_exit_code | 0,256-65280[c] |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->blkio_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->compact_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->freepages_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->irq_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->swapin_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->thrashing_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->delays->wpcopy_delay | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->blkio_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->compact_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->cpu_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->cpu_run_virtual_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->freepages_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->irq_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->swapin_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->thrashing_delay_total | |
| NO_OVERFLOW_SIMPLE | 0 | task->signal->stats->wpcopy_delay_total | |
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq |
kernel/signal.c do_pidfd_send_signal() -> task_pid()
| Type | Parameter | Key | Value |
|---|
kernel/sys.c __do_sys_setpgid() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| CAPPED_DATA | 0 | task | 1 |
| DATA_SOURCE | 0 | task | r find_task_by_vpid |
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq | ||
| LOCK2 | rcu_read |
kernel/sys.c __do_sys_setpgid() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| CAPPED_DATA | 0 | task | 1 |
| DATA_SOURCE | 0 | task | r find_task_by_vpid |
| LOCK2 | global &tasklist_lock | ||
| LOCK2 | irq | ||
| LOCK2 | rcu_read |
kernel/sys.c ksys_setsid() -> task_pid()
| Type | Parameter | Key | Value |
|---|
kernel/sys.c propagate_has_child_subreaper() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | task | 4096-ptr_max |
| DATA_SOURCE | 0 | task | $0 |
| LOCK2 | global &tasklist_lock |
drivers/net/tun.c tun_chr_fasync() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/gfs2/super.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| LOCK2 | &gl->gl_lockref.lock | ||
| TYPE_LOCK | (struct lockref)->lock |
fs/gfs2/dentry.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &gl->gl_lockref.lock | ||
| TYPE_LOCK | (struct lockref)->lock |
sound/core/seq/seq_clientmgr.c snd_seq_open() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | _T->lock |
fs/gfs2/inode.c gfs2_glock_is_locked_by_me() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &gl->gl_lockref.lock | ||
| TYPE_LOCK | (struct lockref)->lock |
arch/x86/kvm/../../../virt/kvm/kvm_main.c kvm_vcpu_ioctl() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| LOCK2 | &vcpu->mutex | ||
| TYPE_LOCK | (struct kvm_vcpu)->mutex |
fs/ocfs2/dlmglue.c ocfs2_add_holder() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &inode->i_rwsem |
fs/ocfs2/dlmglue.c ocfs2_inode_lock_tracker() -> task_pid()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &inode->i_rwsem |