函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-27 10:20:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_getpgid

函数原型:static int do_getpgid(pid_t pid)

返回类型:int

参数:

类型参数名称
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  如果非pidgrp等于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  否则
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  如果非p则转到: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  如果非grp则转到:out
1095  retval等于security_task_getpgid(p)
1096  如果retval则转到: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  返回:retval
调用者
名称描述
SYSCALL_DEFINE1
sys_getpgrp