Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smack_fs_context_dup - Duplicate the security data on fs_context duplication*@fc: The new filesystem context.*@src_fc: The source filesystem context being duplicated.* Returns 0 on success or -ENOMEM on error.

Proto:static int smack_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
643  src = Linux S&M options
645  If Not src Then Return 0
648  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).
649  If Not Linux S&M options Then Return -ENOMEM
651  dst = Linux S&M options
653  If fsdefault Then
654  fsdefault = 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
655  If Not fsdefault Then Return -ENOMEM
658  If fsfloor Then
659  fsfloor = 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
660  If Not fsfloor Then Return -ENOMEM
663  If fshat Then
664  fshat = 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
665  If Not fshat Then Return -ENOMEM
668  If fsroot Then
669  fsroot = 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
670  If Not fsroot Then Return -ENOMEM
673  If fstransmute Then
674  fstransmute = 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
675  If Not fstransmute Then Return -ENOMEM
678  Return 0