Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:copy_mm

Proto:static int copy_mm(unsigned long clone_flags, struct task_struct *tsk)

Type:int

Parameter:

TypeParameterName
unsigned longclone_flags
struct task_struct *tsk
1387  MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: = maj_flt = 0
1388  Context switch counts: = nivcsw = 0
1394  mm = NULL
1395  active_mm = NULL
1402  oldmm = mm
1403  If Not oldmm Then Return 0
1407  vmacache_flush(tsk)
1409  If clone_flags & set if VM shared between processes Then
1410  mmget() - Pin the address space associated with a &struct mm_struct.*@mm: The address space to pin.* Make sure that the address space of the given &struct mm_struct doesn't* go away. This does not protect against parts of the address space being
1411  mm = oldmm
1412  Go to good_mm
1415  retval = -ENOMEM
1416  mm = dup_mm() - duplicates an existing mm structure*@tsk: the task_struct with which the new mm will be associated.*@oldmm: the mm to duplicate.* Allocates a new mm structure and duplicates the provided @oldmm structure* content into it.
1417  If Not mm Then Go to fail_nomem
1420  good_mm :
1421  mm = mm
1422  active_mm = mm
1423  Return 0
1425  fail_nomem :
1426  Return retval
Caller
NameDescribe
copy_processCreate a new process