函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:We try to place it in the list now to make sure it's unique before* we dedicate too many resources. In particular, temporary percpu* memory exhaustion.

函数原型:static int add_unformed_module(struct module *mod)

返回类型:int

参数:

类型参数名称
struct module *mod
3692  state等于 Still setting it up.
3694  again :
3695  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). )
3696  old等于Search for module by name: must hold module_mutex (or preempt disabled* for read-only access).
3697  如果(old != NULL)则
3698  如果state不等于 Normal state.
3703  如果err则转到:out_unlocked
3705  转到:again
3707  err等于负EEXIST
3708  转到:out
3710  mod_update_bounds(mod)
3711  添加RCU保护项
3712  mod_tree_insert(mod)
3713  err等于0
3715  out :
3716  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.
3717  out_unlocked :
3718  返回:err
调用者
名称描述
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.