函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lockdep.c Create Date:2022-07-27 10:50:58
Last Modify:2020-03-17 14:16:01 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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 <from> to <to>:

函数原型:void debug_check_no_locks_freed(const void *mem_from, unsigned long mem_len)

返回类型:void

参数:

类型参数名称
const void *mem_from
unsigned longmem_len
5278  curr等于当前进程
5283  如果此条件成立可能性小(为编译器优化)(!We want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and)则返回
5286  raw_local_irq_save(flags)
5287 i小于lockdep_depth循环
5288  hlock等于held_locksi
5290  如果not_in_range(mem_from, mem_len, instance, instance的长度)则继续下一循环
5294  print_freed_lock_bug(curr, mem_from, mem_from + mem_len, hlock)
5295  退出
5297  raw_local_irq_restore(flags)
调用者
名称描述
debug_mutex_init
debug_rt_mutex_init
__raw_spin_lock_init
__rwlock_init
__init_srcu_struct
__init_srcu_struct
vm_unmap_ramvm_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)
__vunmap
free_pages_prepare
kmem_cache_freekmem_cache_free - Deallocate an object*@cachep: The cache the allocation was from.*@objp: The previously allocated object.* Free an object which was previously allocated from this* cache.
kmem_cache_free_bulk
kfree释放内存