函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_add_mnt_opt

函数原型:static int selinux_add_mnt_opt(const char *option, const char *val, int len, void **mnt_opts)

返回类型:int

参数:

类型参数名称
const char *option
const char *val
intlen
void **mnt_opts
1041  token等于Opt_error
1044 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(tokens)循环
1045  如果字符串比较恒等于0则
1046  token等于opt
1047  退出
1051  如果token恒等于Opt_error则返回:负EINVAL
1054  如果token不等于Opt_seclabel
1055  val等于kmemdup_nul - Create a NUL-terminated string from unterminated data*@s: The data to stringify*@len: The size of the data*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s with NUL-termination or %NULL
1056  如果非val
1057  rc等于负ENOMEM
1058  转到:free_opt
1061  rc等于selinux_add_opt(token, val, mnt_opts)
1062  如果此条件成立可能性小(为编译器优化)(rc)则
1063  释放内存
1064  转到:free_opt
1066  返回:rc
1068  free_opt :
1069  如果mnt_opts
1070  selinux_free_mnt_opts( * mnt_opts)
1071  * mnt_opts = NULL
1073  返回:rc