函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-27 16:19:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:int mm_take_all_locks(struct mm_struct *mm)

返回类型:int

参数:

类型参数名称
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 vma循环
3536  如果signal_pending(当前进程)则转到:out_unlock
3538  如果File we map to (can be NULL). f_mappingis_vm_hugetlb_page(vma)则vm_lock_mapping(mm, f_mapping)
3543 vma循环
3544  如果signal_pending(当前进程)则转到:out_unlock
3546  如果File we map to (can be NULL). f_mapping且非is_vm_hugetlb_page(vma)则vm_lock_mapping(mm, f_mapping)
3551 vma循环
3552  如果signal_pending(当前进程)则转到:out_unlock
3554  如果Serialized by page_table_lock 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  返回:0
3561  out_unlock :
3562  The mmap_sem cannot be released by the caller until* mm_drop_all_locks() returns.
3563  返回:负EINTR
调用者
名称描述
__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.