函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.

函数原型:void kvfree(const void *addr)

返回类型:void

参数:

类型参数名称
const void *addr
600  如果Determine if an address is within the vmalloc range* On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there* is no special casing required.vfree(addr)
602  否则释放内存
调用者
名称描述
iov_iter_get_pages_alloc
bucket_table_free
free_bucket_spinlocks
test_kvmallocAllocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |
test_kvmalloc_nodeAllocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |
test_kvzallocAllocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |
test_kvzalloc_nodeAllocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |
cgroup_pidlist_destroy_work_fn
pidlist_array_loadLoad a cgroup's pidarray with either procs' tgids or tasks' pids
relay_free_page_array an array of pointers of struct page
bpf_prog_free_linfo
bpf_map_area_free
__bpf_prog_put_rcu
check_cfg-recursive depth-first-search to detect loops in BPF program* loop == back-edge in directed graph
check_btf_func
check_btf_line
free_states
btf_add_type
btf_free
env_resolve_init
btf_verifier_env_free
btf_parse_vmlinux
vmemdup_uservmemdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result may be not* physically contiguous. Use kvfree() to free.
pcpu_mem_freepcpu_mem_free - free memory*@ptr: memory to free* Free @ptr. @ptr should have been allocated using pcpu_mem_zalloc().
__vunmap
exit_swap_address_space
SYSCALL_DEFINE1
alloc_swap_info
SYSCALL_DEFINE2
alloc_swap_slot_cache
drain_slots_cache_cpu
memcg_free_shrinker_map_rcu
memcg_free_shrinker_maps
__gup_benchmark_ioctl
frame_vector_destroyame_vector_destroy() - free memory allocated to carry frame vector*@vec: Frame vector to free* Free structure allocated by frame_vector_create() to carry frames.
newquewque - Create a new msg queue*@ns: namespace*@params: ptr to the structure that contains the key and msgflg* Called with msg_ids.rwsem held (writer)
sem_rcu_free
newarywary - Create a new semaphore set*@ns: namespace*@params: ptr to the structure that contains key, semflg and nsems* Called with sem_ids.rwsem held (as a writer)
semctl_main
do_semtimedop
shm_rcu_free
newsegwseg - Create a new shared memory segment*@ns: namespace*@params: ptr to the structure that contains key, size and shmflg* Called with shm_ids.rwsem held as a writer.
keyctl_instantiate_key_commonInstantiate a key with the specified payload and link the key into the* destination keyring if one is given.* The caller must have the appropriate instantiation permit set for this to* work (see keyctl_assume_authority). No other permissions are required.
cap_convert_nscapUser requested a write of security.capability. If needed, update the* xattr to change from v2 to v3, or to fixup the v3 rootid.* If all is ok, we return the new size, on error return < 0.
rawdata_f_data_free
aa_simple_write_to_bufferaa_simple_write_to_buffer - common routine for getting policy from user*@userbuf: user buffer to copy data from (NOT NULL)*@alloc_size: size of user buffer (REQUIRES: @alloc_size >= @copy_size)*@copy_size: size of data to copy from user buffer*@pos:
deflate_decompress
unpack_tablepack_table - unpack a dfa table (one of accept, default, base, next check)*@blob: data to unpack (NOT NULL)*@bsize: size of blob* Returns: pointer to table else NULL on failure* NOTE: must be freed by kvfree (not kfree)
dfa_freedfa_free - free a dfa allocated by aa_dfa_unpack*@dfa: the dfa to free (MAYBE NULL)* Requires: reference count to dfa == 0
aa_dfa_unpackaa_dfa_unpack - unpack the binary tables of a serialized dfa*@blob: aligned serialized stream of data to unpack (NOT NULL)*@size: size of data to unpack*@flags: flags controlling what type of accept tables are acceptable
do_loaddata_freed to take the ns mutex lock which is NOT safe most places that* put_loaddata is called, so we have to delay freeing it
deflate_compress
compress_loaddata
__free_fdtable
alloc_fdtable
traverse
seq_readseq_read - ->read() method for sequential files.*@file: the file to read from*@buf: the buffer to read to*@size: the maximum number of bytes to read*@ppos: the current position in the file* Ready-made ->f_op->read()
seq_releaseseq_release - free the structures associated with sequential file.*@file: file in question*@inode: its inode* Frees the structures associated with sequential file; can be used* as ->f_op->release() if you don't have private data to destroy.
single_open_size
setxattrExtended attribute SET operations
getxattrExtended attribute GET operations
listxattrExtended attribute LIST operations
default_file_splice_read
io_sqe_buffer_unregister
io_sqe_buffer_register
pipe_get_pages_alloc
groups_free
inet_ehash_locks_free
msg_rcu_free
sem_rcu_free
shm_rcu_free
bio_map_user_iov_map_user_iov - map user iovec into bio*@q: the struct request_queue for the bio*@iter: iovec iterator*@gfp_mask: memory allocation flags* Map the user space address into a bio suitable for io to a block* device. Returns an error pointer in case of error.
SYSCALL_DEFINE5Extract the description of a new key from userspace and either add it as a* new key to the specified keyring or update a matching key in that keyring.* If the description is NULL or an empty string, the key type is asked to* generate one from the payload.
core_sys_selectWe can actually return ERESTARTSYS instead of EINTR, but I'd* like to be certain this leads to no problems. So I return* EINTR just for safety.* Update: ERESTARTSYS breaks at least the xview clock binary, so