函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\userfaultfd.c Create Date:2022-07-29 10:52:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:serfaultfd_ctx_put - Releases a reference to the internal userfaultfd* context.*@ctx: [in] Pointer to userfaultfd context.* The userfaultfd context reference must have been previously acquired either* with userfaultfd_ctx_get() or userfaultfd_ctx_fdget().

函数原型:static void userfaultfd_ctx_put(struct userfaultfd_ctx *ctx)

返回类型:void

参数:

类型参数名称
struct userfaultfd_ctx *ctx
166  如果_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED
167  VM_BUG_ON(spin_is_locked() - Check whether a spinlock is locked)
168  VM_BUG_ON(waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_)
169  VM_BUG_ON(spin_is_locked() - Check whether a spinlock is locked)
170  VM_BUG_ON(waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_)
171  VM_BUG_ON(spin_is_locked() - Check whether a spinlock is locked)
172  VM_BUG_ON(waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_)
173  VM_BUG_ON(spin_is_locked() - Check whether a spinlock is locked)
174  VM_BUG_ON(waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_)
175  mmdrop(mm with one ore more vmas attached to this userfaultfd_ctx )
176  kmem_cache_free(userfaultfd_ctx_cachep, ctx)
调用者
名称描述
handle_userfaultThe locking rules involved in returning VM_FAULT_RETRY depending on* FAULT_FLAG_ALLOW_RETRY, FAULT_FLAG_RETRY_NOWAIT and* FAULT_FLAG_KILLABLE are not straightforward
userfaultfd_event_wait_completion
mremap_userfaultfd_complete
userfaultfd_release
userfaultfd_ctx_read