All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] exec-do-not-call-request_module-twice-from-search_binary_handler.patch removed from -mm tree
@ 2011-07-27 19:28 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-07-27 19:28 UTC (permalink / raw)
  To: penguin-kernel, richard, viro, mm-commits


The patch titled
     exec: do not call request_module() twice from search_binary_handler()
has been removed from the -mm tree.  Its filename was
     exec-do-not-call-request_module-twice-from-search_binary_handler.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: exec: do not call request_module() twice from search_binary_handler()
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

Currently, search_binary_handler() tries to load binary loader module
using request_module() if a loader for the requested program is not yet
loaded.  But second attempt of request_module() does not affect the result
of search_binary_handler().

If request_module() triggered recursion, calling request_module() twice
causes 2 to the power of MAX_KMOD_CONCURRENT (= 50) repetitions.  It is
not an infinite loop but is sufficient for users to consider as a hang up.

Therefore, this patch changes not to call request_module() twice, making 1
to the power of MAX_KMOD_CONCURRENT repetitions in case of recursion.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Richard Weinberger <richard@nod.at>
Tested-by: Richard Weinberger <richard@nod.at>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/exec.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN fs/exec.c~exec-do-not-call-request_module-twice-from-search_binary_handler fs/exec.c
--- a/fs/exec.c~exec-do-not-call-request_module-twice-from-search_binary_handler
+++ a/fs/exec.c
@@ -1440,6 +1440,8 @@ int search_binary_handler(struct linux_b
 			    printable(bprm->buf[2]) &&
 			    printable(bprm->buf[3]))
 				break; /* -ENOEXEC */
+			if (try)
+				break; /* -ENOEXEC */
 			request_module("binfmt-%04x", *(unsigned short *)(&bprm->buf[2]));
 #endif
 		}
_

Patches currently in -mm which might be from penguin-kernel@I-love.SAKURA.ne.jp are

origin.patch
linux-next.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-27 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 19:28 [merged] exec-do-not-call-request_module-twice-from-search_binary_handler.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.