Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-28 14:46:02
Last Modify:2022-05-23 14:12:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:SYSCALL_DEFINE1

Proto:SYSCALL_DEFINE1(mlockall, int, flags)

Type:

Parameter:Nothing

804  If Not flags || flags & ~( lock all current mappings | lock all future mappings | lock all pages that are faulted in ) || flags == lock all pages that are faulted in Then Return -EINVAL
808  If Not can_do_mlock() Then Return -EPERM
811  lock_limit = rlimit(RLIMIT_MEMLOCK)
812  lock_limit >>= PAGE_SHIFT determines the page size
814  If lock for writing Then Return -EINTR
817  ret = -ENOMEM
818  If Not (flags & lock all current mappings ) || total_vm <= lock_limit || Check operation authority Then ret = Take the MCL_* flags passed into mlockall (or 0 if called from munlockall)* and translate into the appropriate modifications to mm->def_flags and/or the* flags for all current VMAs.* There are a couple of subtleties with this
821  lease a write lock
822  If Not ret && flags & lock all current mappings Then mm_populate(0, TASK_SIZE)
825  Return ret