Defined in 2 files as a function:

Referenced in 39 files:

Smatch caller information:

drivers/tty/tty_io.c __do_SAK() -> get_pid()

Type Parameter Key Value
LOCK2 &tty->ctrl.lock
LOCK2 irq
HALF_LOCKED2 &pool->lock
HALF_LOCKED2 global &console_sem
TYPE_LOCK (struct tty_struct)->ctrl.lock

drivers/tty/tty_io.c __tty_fasync() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL
LOCK2 &tty->ctrl.lock
LOCK2 &tty->legacy_mutex
LOCK2 flags
TYPE_LOCK (struct tty_struct)->ctrl.lock
TYPE_LOCK (struct tty_struct)->legacy_mutex

drivers/usb/core/devio.c async_completed() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
LOCK2 &ps->lock
LOCK2 flags
TYPE_LOCK (struct usb_dev_state)->lock

drivers/usb/core/devio.c usbdev_open() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 &dev->dev.mutex
TYPE_LOCK (struct device)->mutex

drivers/gpu/host1x/context.c host1x_memory_context_alloc() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $2
LOCK2 &cdl->lock
TYPE_LOCK (struct host1x_memory_context_list)->lock

sound/core/rawmidi.c open_substream() -> get_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/glock.c __gfs2_holder_init() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING

fs/gfs2/glock.c gfs2_holder_reinit() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &fp->f_fl_mutex

fs/pidfs.c pidfs_alloc_file() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $0
RX_PATH
TASK_NOT_RUNNING

fs/pidfs.c pidfs_ino_get_pid() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 1-u64max
PARAM_VALUE 0 pid->attr 4096-ptr_max
DATA_SOURCE 0 pid r rhashtable_lookup
RX_PATH
TASK_NOT_RUNNING
LOCK2 rcu_read

drivers/tty/vt/vt_ioctl.c vt_ioctl() -> get_pid()

Type Parameter Key Value
LOCK2 global &console_sem

drivers/tty/vt/vt_ioctl.c vt_k_ioctl() -> get_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() -> get_pid()

Type Parameter Key Value
LOCK2 global &console_sem

security/landlock/fs.c hook_file_set_fowner() -> get_pid()

Type Parameter Key Value

kernel/time/posix-cpu-timers.c posix_cpu_timer_create() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 1-u64max
DATA_SOURCE 0 pid r pid_for_clock
LOCK2 rcu_read

drivers/gpu/drm/drm_file.c drm_file_alloc() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING

drivers/gpu/drm/drm_file.c drm_file_update_pid() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid r task_tgid
NOCHECK_CALL
LOCK2 &dev->filelist_mutex
TYPE_LOCK (struct drm_device)->filelist_mutex

sound/core/pcm.c snd_pcm_attach_substream() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 &pcm->open_mutex
TYPE_LOCK (struct snd_pcm)->open_mutex

drivers/infiniband/core/umem_odp.c ib_umem_odp_alloc_child() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &pool->lock

drivers/gpu/drm/msm/msm_gem_submit.c submit_create() -> get_pid()

Type Parameter Key Value

arch/x86/kvm/i8254.c kvm_create_pit() -> get_pid()

Type Parameter Key Value
LOCK2 &kvm->lock
TYPE_LOCK (struct kvm)->lock

ipc/sem.c ipc_update_pid() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $1
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
LOCK2 rcu_read
HALF_LOCKED2 sma

kernel/audit.c auditd_set() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 1-u64max
DATA_SOURCE 0 pid $0
RX_PATH
TASK_NOT_RUNNING
LOCK2 global &audit_cmd_mutex.lock
HALF_LOCKED2 &dev->ethtool->rss_lock
HALF_LOCKED2 global &hwsim_phys_lock
HALF_LOCKED2 global &rtnl_mutex
HALF_LOCKED2 global &rx_queue_mutex
HALF_LOCKED2 rcu_read

fs/proc/array.c get_children_pid() -> get_pid()

Type Parameter Key Value
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() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 &seq->lock
LOCK2 global &tasklist_lock
TYPE_LOCK (struct seq_file)->lock

ipc/msg.c ipc_update_pid() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $1
PREEMPT_ADD
HALF_LOCKED2 &msq->q_perm.lock
HALF_LOCKED2 rcu_read

init/main.c kernel_init_freeable() -> get_pid()

Type Parameter Key Value

security/landlock/domain.c get_current_details() -> get_pid()

Type Parameter Key Value

drivers/misc/genwqe/card_dev.c genwqe_add_file() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING

net/unix/af_unix.c copy_peercred() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &sk->sk_peer_lock
TYPE_LOCK (struct sock)->sk_peer_lock

net/unix/af_unix.c prepare_peercred() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid->attr 4096-ptr_max
DATA_SOURCE 0 pid r task_tgid
RX_PATH
TASK_NOT_RUNNING

net/unix/af_unix.c scm_set_cred() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $1
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &u->iolock

net/unix/af_unix.c unix_maybe_add_creds() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid->attr 4096-ptr_max
DATA_SOURCE 0 pid r task_tgid
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &vq->mutex

net/unix/af_unix.c unix_scm_to_skb() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 0,4096-ptr_max
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &vq->mutex

kernel/pid.c find_get_pid() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 rcu_read

kernel/pid.c get_task_pid() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 rcu_read
HALF_LOCKED2 &p->mutex
HALF_LOCKED2 &sbi->wq_mutex
HALF_LOCKED2 &vcpu->mutex

kernel/pid.c pidfd_get_pid() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 0-ptr_max
BUF_SIZE 0 pid s32min-(-2),1-s32max
BUF_SIZE 0 pid s32min-(-2),1-s32max
DATA_SOURCE 0 pid r pidfd_pid
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL

drivers/tty/tty_jobctrl.c __proc_set_tty() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &tty->ctrl.lock
LOCK2 flags
LOCK2 global &tasklist_lock
LOCK2 irq
HALF_LOCKED2 &tty->legacy_mutex
TYPE_LOCK (struct tty_struct)->ctrl.lock

drivers/tty/tty_jobctrl.c __proc_set_tty() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &tty->ctrl.lock
LOCK2 flags
LOCK2 global &tasklist_lock
LOCK2 irq
HALF_LOCKED2 &tty->legacy_mutex
TYPE_LOCK (struct tty_struct)->ctrl.lock

drivers/tty/tty_jobctrl.c tiocspgrp() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 4096-ptr_max
DATA_SOURCE 0 pid r find_vpid
LOCK2 &real_tty->ctrl.lock
LOCK2 irq
LOCK2 rcu_read
TYPE_LOCK (struct tty_struct)->ctrl.lock

drivers/tty/tty_jobctrl.c tty_get_pgrp() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &tty->ctrl.lock
LOCK2 flags
HALF_LOCKED2 &m->lock
HALF_LOCKED2 &task->signal->exec_update_lock
HALF_LOCKED2 _T->lock
TYPE_LOCK (struct tty_struct)->ctrl.lock

drivers/tty/tty_jobctrl.c tty_signal_session_leader() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &p->sighand->siglock
LOCK2 &tty->ctrl.lock
LOCK2 &tty->legacy_mutex
LOCK2 global &tasklist_lock
LOCK2 irq
HALF_LOCKED2 &tty->driver_data->d_lockref.lock
TYPE_LOCK (struct sighand_struct)->siglock
TYPE_LOCK (struct tty_struct)->ctrl.lock
TYPE_LOCK (struct tty_struct)->legacy_mutex

drivers/tty/tty_jobctrl.c tty_signal_session_leader() -> get_pid()

Type Parameter Key Value
PARAM_VALUE 0 pid 4096-ptr_max
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &p->sighand->siglock
LOCK2 &tty->ctrl.lock
LOCK2 &tty->legacy_mutex
LOCK2 global &tasklist_lock
LOCK2 irq
HALF_LOCKED2 &tty->driver_data->d_lockref.lock
TYPE_LOCK (struct sighand_struct)->siglock
TYPE_LOCK (struct tty_struct)->ctrl.lock
TYPE_LOCK (struct tty_struct)->legacy_mutex

kernel/time/posix-timers.c do_timer_create() -> get_pid()

Type Parameter Key Value
LOCK2 rcu_read

kernel/time/posix-timers.c do_timer_create() -> get_pid()

Type Parameter Key Value

drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c etnaviv_ioctl_gem_submit() -> get_pid()

Type Parameter Key Value

net/core/sock.c sk_getsockopt() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &sk->sk_peer_lock
TYPE_LOCK (struct sock)->sk_peer_lock

fs/notify/fanotify/fanotify.c fanotify_alloc_event() -> get_pid()

Type Parameter Key Value

net/bluetooth/af_bluetooth.c bt_accept_enqueue() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
LOCK2 &sk->sk_peer_lock
HALF_LOCKED2 &chan->lock
HALF_LOCKED2 &conn->lock
HALF_LOCKED2 &sk->sk_lock.slock
HALF_LOCKED2 global &hci_cb_list_lock
HALF_LOCKED2 global &rfcomm_mutex
HALF_LOCKED2 parent
HALF_LOCKED2 sk
TYPE_LOCK (struct sock)->sk_peer_lock

net/bluetooth/af_bluetooth.c bt_sock_alloc() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 &sk->sk_peer_lock
TYPE_LOCK (struct sock)->sk_peer_lock

drivers/gpu/drm/msm/msm_gpu.c msm_gpu_create_private_vm() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 _T->lock

sound/core/control.c snd_ctl_open() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING

sound/core/seq/seq_clientmgr.c snd_seq_open() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
LOCK2 _T->lock

mm/damon/core.c damon_commit_target() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL

ipc/shm.c ipc_update_pid() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $1
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &ids->rwsem
HALF_LOCKED2 &ipcp->lock
HALF_LOCKED2 rcu_read

ipc/shm.c newseg() -> get_pid()

Type Parameter Key Value
LOCK2 &ids->rwsem
TYPE_LOCK (struct ipc_ids)->rwsem

fs/ocfs2/dlmglue.c ocfs2_add_holder() -> get_pid()

Type Parameter Key Value
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &inode->i_rwsem

net/netlink/af_netlink.c scm_set_cred() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $1
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &vq->mutex
HALF_LOCKED2 sk

fs/fcntl.c __f_setown() -> get_pid()

Type Parameter Key Value
DATA_SOURCE 0 pid $1
RX_PATH
TASK_NOT_RUNNING
LOCK2 &f_owner->lock
LOCK2 irq
HALF_LOCKED2 &ctx->flc_lock
HALF_LOCKED2 &tty->legacy_mutex
HALF_LOCKED2 global &dnotify_group->mark_mutex
HALF_LOCKED2 rcu_read
TYPE_LOCK (struct fown_struct)->lock

ipc/mqueue.c do_mq_notify() -> get_pid()

Type Parameter Key Value
PREEMPT_ADD <- disables preempt
LOCK2 &info->lock
TYPE_LOCK (struct mqueue_inode_info)->lock