Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_fs_context_dup

Proto:static int selinux_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
struct fs_context *src_fc
2784  src = Linux S&M options
2787  If Not src Then Return 0
2790  Linux S&M options = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2791  If Not Linux S&M options Then Return -ENOMEM
2794  opts = Linux S&M options
2796  If fscontext Then
2797  fscontext = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
2798  If Not fscontext Then Return -ENOMEM
2801  If context Then
2802  context = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
2803  If Not context Then Return -ENOMEM
2806  If rootcontext Then
2807  rootcontext = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
2808  If Not rootcontext Then Return -ENOMEM
2811  If defcontext Then
2812  defcontext = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
2813  If Not defcontext Then Return -ENOMEM
2816  Return 0