lkml.org 
[lkml]   [2012]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Patch] kernel/sys.c: fix an incorrect error branch in orderly_poweroff()

Also, the call_usermodehelper_fns() interface is rather nasty. Let's
try to prevent mistakes:

--- a/kernel/kmod.c~a
+++ a/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),
_


\
 
 \ /
  Last update: 2012-07-12 02:01    [W:0.388 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site