Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__vunmap

Proto:static void __vunmap(const void *addr, int deallocate_pages)

Type:void

Parameter:

TypeParameterName
const void *addr
intdeallocate_pages
2279  If Not addr Then Return
2282  If WARN(!st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (addr), "Trying to vfree() bad address (%p)\n", addr) Then Return
2286  area = d_vm_area - find a continuous kernel virtual area*@addr: base address* Search for the kernel VM area starting at @addr, and return it
2287  If Value for the false possibility is greater at compile time(!area) Then
2288  WARN(1, r conditions "Trying to vfree() nonexistent vm area (%p)\n", addr)
2290  Return
2293  Called when kernel memory is freed (or unmapped), or if a lock* is destroyed or reinitialized - this code checks whether there is* any held lock in the memory range of to :
2294  debug_check_no_obj_freed(addr, Lowlevel-APIs (not for driver use!))
2296  kasan_poison_vmalloc(addr, size)
2298  Handle removing and resetting vm mappings related to the vm_struct.
2300  If deallocate_pages Then
2303  When i < nr_pages cycle
2304  page = pages[i]
2306  BUG_ON(!page)
2307  __free_pages(page, 0)
2309  atomic_long_sub(nr_pages, & nr_vmalloc_pages)
2311  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.
2314  kfree(area)
2315  Return
Caller
NameDescribe
free_work
__vfree
vunmapvunmap - release virtual mapping obtained by vmap()*@addr: memory base address* Free the virtually contiguous memory area starting at @addr,* which was created from the page array passed to vmap().* Must not be called in interrupt context.