Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-28 09:20:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_getpgid

Proto:static int do_getpgid(pid_t pid)

Type:int

Parameter:

TypeParameterName
pid_tpid
1083  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1084  If Not pid Then grp = Without tasklist or RCU lock it is not safe to dereference* the result of task_pgrp/task_session even if task == current,* we can race with another thread doing sys_setsid/sys_setpgid.
1086  Else
1087  retval = -ESRCH
1088  p = d a task by one of its numerical ids* find_task_by_pid_ns():* finds a task by its pid in the specified namespace* find_task_by_vpid():* finds a task by its virtual pid* see also find_vpid() etc in include/linux/pid.h
1089  If Not p Then Go to out
1091  grp = Without tasklist or RCU lock it is not safe to dereference* the result of task_pgrp/task_session even if task == current,* we can race with another thread doing sys_setsid/sys_setpgid.
1092  If Not grp Then Go to out
1095  retval = security_task_getpgid(p)
1096  If retval Then Go to out
1099  retval = pid_vnr(grp)
1100  out :
1101  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1102  Return retval
Caller
NameDescribe
SYSCALL_DEFINE1
sys_getpgrp