Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-28 08:58:56
Last Modify:2020-03-17 11:04:53 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check constraints on flags passed to the unshare system call.

Proto:static int check_unshare_flags(unsigned long unshare_flags)

Type:int

Parameter:

TypeParameterName
unsigned longunshare_flags
2821  If unshare_flags & ~( Same thread group | set if fs info shared between processes | New mount namespace group | set if signal handlers and blocked signals shared | set if VM shared between processes | set if open files shared between processes | share system V SEM_UNDO semantics | New utsname namespace | New ipc namespace | New network namespace | New user namespace | New pid namespace | New cgroup namespace ) Then Return -EINVAL
2832  If unshare_flags & ( Same thread group | set if signal handlers and blocked signals shared | set if VM shared between processes ) Then
2833  If Not thread_group_empty(current process) Then Return -EINVAL
2836  If unshare_flags & (set if signal handlers and blocked signals shared | set if VM shared between processes ) Then
2837  If _read - get a refcount's value*@r: the refcount* Return: the refcount's value > 1 Then Return -EINVAL
2840  If unshare_flags & set if VM shared between processes Then
2841  If Not Returns true if the task does not share ->mm with another thread/process. Then Return -EINVAL
2845  Return 0
Caller
NameDescribe
ksys_unshareshare allows a process to 'unshare' part of the process* context which was originally shared using clone. copy_** functions used by do_fork() cannot be used here directly* because they modify an inactive task_struct that is being* constructed