Commit 79c743dd authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent deb8274a
...@@ -577,6 +577,12 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) ...@@ -577,6 +577,12 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
return retval; 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( int call_usermodehelper_fns(
char *path, char **argv, char **envp, int wait, char *path, char **argv, char **envp, int wait,
int (*init)(struct subprocess_info *info, struct cred *new), int (*init)(struct subprocess_info *info, struct cred *new),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment