函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:groups_alloc

函数原型:struct group_info *groups_alloc(int gidsetsize)

返回类型:struct group_info

参数:

类型参数名称
intgidsetsize
20  len等于sizeof(structgroup_info)加sizeof(kgid_t)乘gidsetsize
21  gi等于开辟内存
22  如果非gigi等于__vmalloc(len, GFP_KERNEL_ACCOUNT, PAGE_KERNEL)
24  如果非gi则返回:NULL
27  atomic_set( & usage, 1)
28  ngroups等于gidsetsize
29  返回:gi
调用者
名称描述
SYSCALL_DEFINE2SMP: Our groups are copy-on-write. We can set them safely* without another task interfering.
SYSCALL_DEFINE2