函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Free a module, remove from lists, etc.

函数原型:static void free_module(struct module *mod)

返回类型:void

参数:

类型参数名称
struct module *mod
2192  trace_module_free(mod)
2194  mod_sysfs_teardown(mod)
2198  mutex_lock( & Mutex protects:* 1) List of modules (also safely readable with preempt_disable),* 2) module_use links,* 3) module_addr_min/module_addr_max.* (delete and add uses RCU list operations). )
2199  state等于 Still setting it up.
2200  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
2203  Called in response to a module being unloaded. Removes* any ddebug_table's which point at the module.
2206  module_arch_cleanup(mod)
2209  module_unload_free(mod)
2212  destroy_params(kp, num_kp)
2214  如果is_livepatch_module(mod)则free_module_elf(mod)
2218  mutex_lock( & Mutex protects:* 1) List of modules (also safely readable with preempt_disable),* 2) module_use links,* 3) module_addr_min/module_addr_max.* (delete and add uses RCU list operations). )
2220  删除不需要重新初始化的列表项
2221  mod_tree_remove(mod)
2223  module_bug_cleanup(mod)
2225  Wait for a grace period to elapse. But it is illegal to invoke* synchronize_rcu() from within an RCU read-side critical section.* Therefore, any legal call to synchronize_rcu() is a quiescent
2226  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
2229  module_arch_freeing_init(mod)
2230  module_memfree( The actual code + data. )
2231  kfree( The command line arguments (may be mangled). People like keeping pointers to this stuff )
2232  percpu_modfree(mod)
2235  lockdep_free_key_range( The actual code + data. , Total size. )
2238  module_memfree( The actual code + data. )
调用者
名称描述
do_init_moduleThis is where the real work happens.* Keep it uninlined to provide a reliable breakpoint target, e.g. for the gdb* helper command 'lx-symbols'.