diff --git a/kernel/kmod.c b/kernel/kmod.c index ff2c7cb86d770aaf51712e330dc0f1e8a72a26e6..2a8351516a0ea875a0ca062e149a76bfa9682396 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -577,6 +577,12 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) 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),