summaryrefslogtreecommitdiff
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2012-07-30 14:42:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 17:25:20 -0700
commit79c743dd1e8de61c31f484c0a1b48930543044b3 (patch)
treeba52350fdd587f56182e9d92f94c37f0519c79a2 /kernel/kmod.c
parentdeb8274a0cf44827ec260330cc1d94d0f3dcfb94 (diff)
kernel/kmod.c: document call_usermodehelper_fns() a bit
This function's interface is, uh, subtle. Attempt to apologise for it. Cc: WANG Cong <xiyou.wangcong@gmail.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Kees Cook <keescook@chromium.org> Cc: Serge Hallyn <serge.hallyn@canonical.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Oleg Nesterov <oleg@redhat.com> 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index ff2c7cb86d77..2a8351516a0e 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -577,6 +577,12 @@ unlock:
return retval;
}
+/*
+ * call_usermodehelper_fns() will not run the caller-provided cleanup function
+ * if a memory allocation failure is experienced. So the caller might need to
+ * check the call_usermodehelper_fns() return value: if it is -ENOMEM, perform
+ * the necessaary cleanup within the caller.
+ */
int call_usermodehelper_fns(
char *path, char **argv, char **envp, int wait,
int (*init)(struct subprocess_info *info, struct cred *new),