From: Tetsuo Handa Date: Tue, 26 Jul 2011 23:08:42 +0000 (-0700) Subject: exec: do not retry load_binary method if CONFIG_MODULES=n X-Git-Tag: v3.1-rc1~190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4edf8bd06916645b57df23a720b17cae4051c43;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git exec: do not retry load_binary method if CONFIG_MODULES=n If CONFIG_MODULES=n, it makes no sense to retry the list of binary formats handler because the list will not be modified by request_module(). Signed-off-by: Tetsuo Handa Cc: Richard Weinberger Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/exec.c b/fs/exec.c index e6770a5..0e8e599 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1430,9 +1430,9 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) } } read_unlock(&binfmt_lock); +#ifdef CONFIG_MODULES if (retval != -ENOEXEC || bprm->mm == NULL) { break; -#ifdef CONFIG_MODULES } else { #define printable(c) (((c)=='\t') || ((c)=='\n') || (0x20<=(c) && (c)<=0x7e)) if (printable(bprm->buf[0]) && @@ -1443,8 +1443,10 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) if (try) break; /* -ENOEXEC */ request_module("binfmt-%04x", *(unsigned short *)(&bprm->buf[2])); -#endif } +#else + break; +#endif } return retval; }