Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:call_modprobe

Proto:static int call_modprobe(char *module_name, int wait)

Type:int

Parameter:

TypeParameterName
char *module_name
intwait
73  static char * envp[] = {"HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL}
80  argv = Allocation memory
81  If Not argv Then Go to out
84  module_name = kstrdup(module_name, GFP_KERNEL)
85  If Not module_name Then Go to 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  If Not info Then Go to free_module_name
99  Return 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  free previously allocated memory
103  free_argv :
104  free previously allocated memory
105  out :
106  Return -ENOMEM
Caller
NameDescribe
__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