Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static struct mm_struct *dup_mm(struct task_struct *tsk, struct mm_struct *oldmm)

Type:struct mm_struct

Parameter:

TypeParameterName
struct task_struct *tsk
struct mm_struct *oldmm
1351  mm = allocate_mm()
1352  If Not mm Then Go to fail_nomem
1355  No 3D Now!(mm, oldmm, size of mm )
1357  If Not mm_init(mm, tsk, user_ns) Then Go to fail_nomem
1360  err = dup_mmap(mm, oldmm)
1361  If err Then Go to free_pt
1364  High-watermark of RSS usage = get_mm_rss(mm)
1365  High-water virtual memory usage = Total pages mapped
1367  If binfmt && Not try_module_get(module) Then Go to free_pt
1370  Return mm
1372  free_pt :
1374  binfmt = NULL
1375  mm_init_owner(mm, NULL)
1376  Decrement the use count and release all resources for an mm.
1378  fail_nomem :
1379  Return NULL
Caller
NameDescribe
copy_mm
copy_init_mm