Function Report

Linux Kernel (v4.4)

Source File:mm\slob.c Create Date:2016-01-14 12:50:46
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:kmem_cache_free

Function:void kmem_cache_free(struct kmem_cache *c, void *b)

Return Type:void

Parameter:

Type Parameter NameRemarks
struct kmem_cache * c
void * b

Function description:

600  kmemleak_free_recursive(b, Active flags on the slab)
601  If Value for the false possibility is greater at compile time then
603  is inserted at the tail of allocated slob blocks, which were created with a SLAB_DESTROY_BY_RCU slab. slob_rcu is used to free the block using call_rcu. = b + The aligned/padded/added on size - length of structslob_rcu
604  is inserted at the tail of allocated slob blocks, which were created with a SLAB_DESTROY_BY_RCU slab. slob_rcu is used to free the block using call_rcu. = The aligned/padded/added on size
605  Queue a preemptible-RCU callback for invocation after a grace period.
606  Else
607  __kmem_cache_free(b, The aligned/padded/added on size)
610  trace_kmem_cache_free(_RET_IP_, b)
Caller
Function NameFunction description
reqsk_free
radix_tree_node_rcu_free
__radix_tree_preloadLoad up this CPU's radix_tree_node buffer with sufficient objects to ensure that the addition of a single element in the tree cannot fail. On success, return zero, with preemption disabled. On error, return-ENOMEM with preemption not disabled.
radix_tree_callback
idr_layer_rcu_free
idr_destroy release all cached layers within an idr tree
ida_get_new_above allocate new ID above or equal to a start id
kmem_cache_oob
btree_free
free_obj_workworkqueue function to free objects.
debug_objects_replace_static_objectsConvert the statically allocated objects to dynamic ones:
lc_create prepares to track objects in an active set
lc_free_by_index
taskstats_tgid_free
delayacct_tsk_freeFree tsk->delays. Called from bad fork and __put_task_struct where there's no risk of tsk->delays being accessed elsewhere
free_task_struct
free_signal_struct
dup_mmap
__cleanup_sighand
free_userIRQs are disabled and uidhash_lock is held upon function entry. IRQ state(as stored in flags) is restored and uidhash_lock released upon function exit.
alloc_uid
__sigqueue_free
rcu_free_pwq
put_pid
alloc_pid
create_new_namespacesCreate new nsproxy and all of its the associated namespaces. Return the newly created nsproxy. Do not attach this to the task, leave it to the caller to do proper locking and attach it to task.
free_nsproxy
put_cred_rcuThe RCU callback to actually dispose of a set of credentials
alloc_posix_timer
k_itimer_rcu_free
create_user_nsCreate a new user namespace, deriving the creator from the user in the passed credentials, and replacing that user with the new root user for the new namespace.
free_user_ns
create_pid_namespace
delayed_free_pidns
taskstats_tgid_alloc
trace_destroy_fields
remove_event_file_dir
mempool_free_slab
__kmem_cache_free_bulk
create_cache
slab_kmem_cache_release
__put_nommu_regionrelease a reference to a region- the caller must hold the region semaphore for writing, which this releases- the region may not have been added to the tree yet, in which case vm_top will equal vm_start
delete_vmadestroy a VMA record
do_mmaphandle mapping creation for uClinux
split_vmasplit a vma into two pieces at address'addr', a new vma is allocated either for the first part or the tail.
remove_vmaClose a vm structure and free it, returning the next.
vma_adjustWe cannot adjust vm_start, vm_end, vm_pgoff fields of a vma that is already present in an i_mmap tree without adjusting the tree
mmap_region
__split_vmabypasses sysctl_max_map_count checking. We use this on the munmap path where it doesn't make sense to fail.
copy_vmaCopy the vma structure to a new location in the same mm, prior to moving page table entries, to effect an mremap move.
__install_special_mapping
anon_vma_free
anon_vma_chain_free
zswap_entry_cache_free
__mpol_putSlow path of a mpol destructor.
sp_free
sp_alloc
shared_policy_replaceReplace a policy range.
free_rmap_item
free_stable_node
free_mm_slot
free_mm_slot
free_object_rcuRCU callback to free a kmemleak_object.
create_objectCreate the metadata(struct kmemleak_object) corresponding to an allocated memory block and add it to the object_list and object_tree_root.
add_scan_areaAdd a scanning area to the object. If at least one such area is added, kmemleak will only scan these ranges rather than the whole memory block.
free_handle
mqueue_i_callback
bvec_free
free_request_struct
blk_alloc_queue_node
blk_free_queue_rcu
icq_free_icq_rcu
ioc_release_fnSlow path for ioc release in put_io_context(). Performs double-lock dancing to unlink all icq's and then frees ioc.
put_io_context put a reference of io_context
create_task_io_context
ioc_create_icq create and link io_cq
bsg_free_command
cfq_put_queuetask holds one reference to the queue, dropped when task exits. each rq in-flight on this queue also holds a reference, dropped when rq is freed.
avc_xperms_decision_free
avc_xperms_free
avc_node_free
avc_node_kill
avc_insert Insert an AVC entry.
avc_update_nodeUpdate an AVC entry
inode_free_rcu
file_free_security
avtab_insert_node
avtab_destroy
smack_inode_free_security free an inode blob
file_free_rcu
__bprm_mm_init
fasync_free_rcu
fasync_freeNOTE! This can be used only for unused fasync entries: entries that actually got inserted on the fasync list need to be released by rcu- see fasync_remove_entry.
__d_free
__d_free_external
__d_alloc allocate a dcache entry
alloc_inode
free_inode_nonrcu
i_callback
dup_fdAllocate a new files structure and copy contents from the passed in files structure. errorp will be valid only when the returned files_struct is NULL.
put_files_struct
alloc_vfsmnt
free_vfsmnt
free_fs_struct
free_buffer_head
bdev_i_callback
dio_complete called when all DIO BIO I/O has been completed
do_blockdev_direct_IOThis is a library function for use by filesystem drivers.
dnotify_handle_eventMains fsnotify call where events are delivered to dnotify.
dnotify_free_mark
dnotify_flushCalled every time a file is closed. Looks first for a dnotify mark on the
fcntl_dirnotifyWhen a process calls fcntl to attach a dnotify watch to a directory it ends up here. Allocate both a mark for fsnotify to add and a dnotify_struct to be attached to the fsnotify_mark.
inotify_free_markding dong the mark is dead
fanotify_free_event
fanotify_free_mark
ep_unregister_pollwaitThis function unregisters poll callbacks from the associated file descriptor. Must be called with"mtx" held(or"epmutex" if called from ep_free).
epi_rcu_free
ep_insertMust be called with"mtx" held.
userfaultfd_ctx_put Releases a reference to the internal userfaultfd context.
userfaultfd_file_create Creates an userfaultfd file pointer.
free_ioctx
ioctx_alloc Allocates and initializes an ioctx. Returns an ERR_PTR if it failed.
kiocb_free
locks_get_lock_context
locks_free_lock_context
locks_free_lockFree a lock which is not in use.
__mb_cache_entry_forget
dquot_destroy
proc_i_callback
kernfs_put put a reference count on a kernfs_node
__kernfs_new_node
release_configfs_dirent
configfs_new_direntAllocates a new configfs_dirent and links it to the parent configfs_dirent
free_dcookie