Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This operation locks against the VM for all pte/vma/mm related* operations that could ever happen on a certain mm. This includes* vmtruncate, try_to_unmap, and all page faults.* The caller must take the mmap_sem in write mode before calling

Proto:int mm_take_all_locks(struct mm_struct *mm)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
3531  BUG_ON(rylock for reading -- returns 1 if successful, 0 if contention)
3533  mutex_lock( & mm_all_locks_mutex)
3535  When vma cycle
3536  If signal_pending(current process) Then Go to out_unlock
3538  If File we map to (can be NULL). && f_mapping && is_vm_hugetlb_page(vma) Then vm_lock_mapping(mm, f_mapping)
3543  When vma cycle
3544  If signal_pending(current process) Then Go to out_unlock
3546  If File we map to (can be NULL). && f_mapping && Not is_vm_hugetlb_page(vma) Then vm_lock_mapping(mm, f_mapping)
3551  When vma cycle
3552  If signal_pending(current process) Then Go to out_unlock
3554  If Serialized by page_table_lock Then list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(avc, & Serialized by mmap_sem &* page_table_lock , same_vma)
3556  vm_lock_anon_vma(mm, anon_vma)
3559  Return 0
3561  out_unlock :
3562  The mmap_sem cannot be released by the caller until* mm_drop_all_locks() returns.
3563  Return -EINTR
Caller
NameDescribe
__mmu_notifier_registerSame as mmu_notifier_register but here the caller must hold the mmap_sem in* write mode. A NULL mn signals the notifier is being registered for itree* mode.