Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mm_access

Proto:struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)

Type:struct mm_struct

Parameter:

TypeParameterName
struct task_struct *task
unsigned intmode
1227  err = mutex_lock_killable( & cred_guard_mutex)
1228  If err Then Return ERR_PTR(err)
1231  mm = get_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after
1232  If mm && mm != mm && Not ptrace_may_access - check whether the caller is permitted to access* a target task Then
1234  Decrement the use count and release all resources for an mm.
1235  mm = ERR_PTR( - EACCES)
1237  mutex_unlock( & cred_guard_mutex)
1239  Return mm