Skip to content

Commit

Permalink
kmod: correct documentation of return status of request_module
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Goldwyn Rodrigues <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Rusty Russell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
NeilBrown authored and torvalds committed Sep 10, 2015
1 parent b4cc0ef commit 60b61a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ static int call_modprobe(char *module_name, int wait)
* @...: arguments as specified in the format string
*
* Load a module using the user mode module loader. The function returns
* zero on success or a negative errno code on failure. Note that a
* successful module load does not mean the module did not then unload
* and exit on an error of its own. Callers must check that the service
* they requested is now available not blindly invoke it.
* zero on success or a negative errno code or positive exit code from
* "modprobe" on failure. Note that a successful module load does not mean
* the module did not then unload and exit on an error of its own. Callers
* must check that the service they requested is now available not blindly
* invoke it.
*
* If module auto-loading support is disabled then this function
* becomes a no-operation.
Expand Down

0 comments on commit 60b61a6

Please sign in to comment.