diff options
author | Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> | 2011-07-27 01:08:42 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-27 01:49:44 +0200 |
commit | b4edf8bd06916645b57df23a720b17cae4051c43 (patch) | |
tree | d0b6a63dfb043822d28498eae9a89553765ce3fe | |
parent | exec: do not call request_module() twice from search_binary_handler() (diff) | |
download | linux-b4edf8bd06916645b57df23a720b17cae4051c43.tar.xz linux-b4edf8bd06916645b57df23a720b17cae4051c43.zip |
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 <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Richard Weinberger <richard@nod.at>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/exec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c index e6770a526f34..0e8e59939d09 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; } |