aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-09-09 18:38:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-10 16:29:01 -0400
commit60b61a6f42f36e4fbfbc0139b7e86ce1494d2d9b (patch)
tree2f9db61076813c5cc36e66b1a046a1c90cd69b42 /kernel/kmod.c
parentb4cc0efea4f0bfa2477c56af406cfcf3d3e58680 (diff)
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>
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r--kernel/kmod.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 2777f40a9c7b..1734ba61ff23 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -114,10 +114,11 @@ out:
114 * @...: arguments as specified in the format string 114 * @...: arguments as specified in the format string
115 * 115 *
116 * Load a module using the user mode module loader. The function returns 116 * 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 117 * zero on success or a negative errno code or positive exit code from
118 * successful module load does not mean the module did not then unload 118 * "modprobe" on failure. Note that a successful module load does not mean
119 * and exit on an error of its own. Callers must check that the service 119 * the module did not then unload and exit on an error of its own. Callers
120 * they requested is now available not blindly invoke it. 120 * must check that the service they requested is now available not blindly
121 * invoke it.
121 * 122 *
122 * If module auto-loading support is disabled then this function 123 * If module auto-loading support is disabled then this function
123 * becomes a no-operation. 124 * becomes a no-operation.