Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\exec.c Create Date:2022-07-28 20:03:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:exec_mmap

Proto:static int exec_mmap(struct mm_struct *mm)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
1015  tsk = current process
1016  old_mm = mm
1017  exec_mm_release(tsk, old_mm)
1019  If old_mm Then
1020  sync_mm_rss(old_mm)
1027  lock for reading
1030  Return -EINTR
1033  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
1034  active_mm = active_mm
1035  membarrier_exec_mmap(mm)
1036  mm = mm
1037  active_mm = mm
1039  vmacache_seqnum = 0
1040  vmacache_flush(tsk)
1041  task_unlock(tsk)
1042  If old_mm Then
1043  lease a read lock
1044  BUG_ON(active_mm != old_mm)
1045  setmax_mm_hiwater_rss( & maxrss, old_mm)
1046  A task is exiting. If it owned this mm, find a new owner for the mm.
1047  Decrement the use count and release all resources for an mm.
1048  Return 0
1050  mmdrop(active_mm)
1051  Return 0
Caller
NameDescribe
flush_old_execCalling this is the point of no return. None of the failures will be* seen by userspace since either the process is already taking a fatal* signal (via de_thread() or coredump), or will have SEGV raised