函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:wp_page_shared

函数原型:static vm_fault_t wp_page_shared(struct vm_fault *vmf)__releases(vmf->ptl)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
2665  vma等于Target VMA
2666  ret等于VM_FAULT_WRITE
2668  get_page(->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).)
2670  如果Function pointers to deal with this struct. page_mkwrite
2673  pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
2674  tmp等于Notify the address space that the page is about to become writable so that* it can prohibit this or wait for the page to get into an appropriate state.* We do this without the lock held, so that it can sleep if it needs to.
2678  返回:tmp
2680  tmp等于sh_mkwrite_fault - finish page fault for a shared mapping, making PTE* writeable once the page is prepared*@vmf: structure describing the fault* This function handles all that is needed to finish a write page fault in a
2684  返回:tmp
2686  否则
2687  Handle write page faults for pages that can be reused in the current vma* This can happen either due to the mapping being with the VM_SHARED flag,* or due to us being the last reference standing to the page
2688  lock_page may only be called if we have the page's inode pinned.
2690  ret或等于Handle dirtying of a page in shared file mapping on a write fault.* The function expects the page to be locked and unlocks it.
2691  put_page(->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).)
2693  返回:ret
调用者
名称描述
do_wp_pageThis routine handles present pages, when users try to write* to a shared page. It is done by copying the page to a new address* and decrementing the shared-page counter for the old page.* Note that this routine assumes that the protection checks have been