函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Resolve a symbol for this module. I.e. if we find one, record usage.

函数原型:static const struct kernel_symbol *resolve_symbol(struct module *mod, const struct load_info *info, const char *name, char ownername[])

返回类型:struct kernel_symbol

参数:

类型参数名称
struct module *mod
const struct load_info *info
const char *name
charownername
1447  sched_annotate_sleep()
1448  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). )
1449  sym等于Find an exported symbol and return it, along with, (optional) crc and* (optional) module which owns it. Needs preempt disabled or module_mutex.
1451  如果非sym则转到:unlock
1454  如果非check_version(info, name, mod, crc)则
1455  sym等于错误号
1456  转到:getname
1459  err等于verify_namespace_is_imported(info, sym, mod)
1460  如果err
1461  sym等于错误号
1462  转到:getname
1465  err等于ref_module(mod, owner)
1466  如果err
1467  sym等于错误号
1468  转到:getname
1471  getname :
1473  strncpy(ownername, This is a #define so the string doesn't get put in every .o file (owner), MODULE_NAME_LEN)
1474  unlock :
1475  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.
1476  返回:sym
调用者
名称描述
resolve_symbol_wait