Messages in this thread Patch in this message | | | Date | Wed, 11 Jul 2012 16:32:23 -0700 | From | Andrew Morton <> | Subject | Re: [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), _
| |