函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:call_modprobe

函数原型:static int call_modprobe(char *module_name, int wait)

返回类型:int

参数:

类型参数名称
char *module_name
intwait
73  static char * envp[] = {"HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL}
80  argv等于开辟内存
81  如果非argv则转到:out
84  module_name等于kstrdup(module_name, GFP_KERNEL)
85  如果非module_name则转到:free_argv
88  argv[0]等于modprobe_path is set via /proc/sys.
89  argv[1]等于"-q"
90  argv[2]等于"--"
91  argv[3]等于module_name
92  argv[4] = NULL
94  info等于all_usermodehelper_setup - prepare to call a usermode helper*@path: path to usermode executable*@argv: arg vector for process*@envp: environment for process*@gfp_mask: gfp mask for memory allocation*@cleanup: a cleanup function*@init: an init
96  如果非info则转到:free_module_name
99  返回:all_usermodehelper_exec - start a usermode application*@sub_info: information about the subprocessa*@wait: wait for the application to finish and return status.* when UMH_NO_WAIT don't wait at all, but you get no useful error back
101  free_module_name :
102  释放内存
103  free_argv :
104  释放内存
105  out :
106  返回:负ENOMEM
调用者
名称描述
__request_module__request_module - try to load a kernel module*@wait: wait (or not) for the operation to complete*@fmt: printf style format string for the name of the module*@...: arguments as specified in the format string