Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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().

Proto:static void userfaultfd_ctx_put(struct userfaultfd_ctx *ctx)

Type:void

Parameter:

TypeParameterName
struct userfaultfd_ctx *ctx
166  If _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 Then
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)
Caller
NameDescribe
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