Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static int add_unformed_module(struct module *mod)

Type:int

Parameter:

TypeParameterName
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  If (old != NULL) Then
3698  If state != Normal state. Then
3703  If err Then Go to out_unlocked
3705  Go to again
3707  err = -EEXIST
3708  Go to out
3710  mod_update_bounds(mod)
3711  list_add_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head
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  Return err
Caller
NameDescribe
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.