Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Resolve a symbol for this module. I.e. if we find one, record usage.

Proto:static const struct kernel_symbol *resolve_symbol(struct module *mod, const struct load_info *info, const char *name, char ownername[])

Type:struct kernel_symbol

Parameter:

TypeParameterName
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  If Not sym Then Go to unlock
1454  If Not check_version(info, name, mod, crc) Then
1455  sym = ERR_PTR( - EINVAL)
1456  Go to getname
1459  err = verify_namespace_is_imported(info, sym, mod)
1460  If err Then
1461  sym = ERR_PTR(err)
1462  Go to getname
1465  err = ref_module(mod, owner)
1466  If err Then
1467  sym = ERR_PTR(err)
1468  Go to 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  Return sym
Caller
NameDescribe
resolve_symbol_wait