函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vm_unmap_ram - unmap linear kernel address space set up by vm_map_ram*@mem: the pointer returned by vm_map_ram*@count: the count passed to that vm_map_ram call (cannot unmap partial)

函数原型:void vm_unmap_ram(const void *mem, unsigned int count)

返回类型:void

参数:

类型参数名称
const void *mem
unsigned intcount
1772  size等于count左移PAGE_SHIFT determines the page size
1773  addr等于mem
1776  might_sleep()
1777  BUG_ON(!addr)
1778  BUG_ON(addr < VMALLOC_START)
1779  BUG_ON(addr > VMALLOC_END)
1780  BUG_ON(!st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (addr))
1782  kasan_poison_vmalloc(mem, size)
1784  如果此条件成立可能性大(为编译器优化)(count <= 256K with 4K pages )则
1785  debug_check_no_locks_freed(mem, size)
1786  vb_free(mem, size)
1787  返回
1790  va等于find_vmap_area(addr)
1791  BUG_ON(!va)
1792  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 :
1794  Free and unmap a vmap area
调用者
名称描述
vm_map_ramvm_map_ram - map pages linearly into kernel virtual address (vmalloc space)*@pages: an array of pointers to the pages to be mapped*@count: number of pages*@node: prefer to allocate data structures on this node*@prot: memory protection to use