Skip to content

Commit 60b61a6

Browse files
NeilBrowntorvalds
authored andcommitted
kmod: correct documentation of return status of request_module
If request_module() successfully runs modprobe, but modprobe exits with a non-zero status, then the return value from request_module() will be that (positive) error status. So the return from request_module can be: negative errno zero for success positive exit code. Signed-off-by: NeilBrown <neilb@suse.com> Cc: Goldwyn Rodrigues <rgoldwyn@suse.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b4cc0ef commit 60b61a6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎kernel/kmod.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@ static int call_modprobe(char *module_name, int wait)
114114
* @...: arguments as specified in the format string
115115
*
116116
* Load a module using the user mode module loader. The function returns
117-
* zero on success or a negative errno code on failure. Note that a
118-
* successful module load does not mean the module did not then unload
119-
* and exit on an error of its own. Callers must check that the service
120-
* they requested is now available not blindly invoke it.
117+
* zero on success or a negative errno code or positive exit code from
118+
* "modprobe" on failure. Note that a successful module load does not mean
119+
* the module did not then unload and exit on an error of its own. Callers
120+
* must check that the service they requested is now available not blindly
121+
* invoke it.
121122
*
122123
* If module auto-loading support is disabled then this function
123124
* becomes a no-operation.

0 commit comments

Comments
 (0)