Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Free a module, remove from lists, etc.

Proto:static void free_module(struct module *mod)

Type:void

Parameter:

TypeParameterName
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  If is_livepatch_module(mod) Then 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  list_del_rcu - deletes entry from list without re-initialization*@entry: the element to delete from the list
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. )
Caller
NameDescribe
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'.