aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/binfmt_loader.c
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2009-04-30 15:08:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-02 15:36:10 -0700
commit74641f584da8eccf30becfbb5507ab457187db22 (patch)
treeda212b7ae1b5a2a50a4314b3a75df5763623295e /arch/alpha/kernel/binfmt_loader.c
parentalpha: futex implementation (diff)
downloadlinux-dev-74641f584da8eccf30becfbb5507ab457187db22.tar.xz
linux-dev-74641f584da8eccf30becfbb5507ab457187db22.zip
alpha: binfmt_aout fix
This fixes the problem introduced by commit 3bfacef412 (get rid of special-casing the /sbin/loader on alpha): osf/1 ecoff binary segfaults when binfmt_aout built as module. That happens because aout binary handler gets on the top of the binfmt list due to late registration, and kernel attempts to execute the binary without preparatory work that must be done by binfmt_loader. Fixed by changing the registration order of the default binfmt handlers using list_add_tail() and introducing insert_binfmt() function which places new handler on the top of the binfmt list. This might be generally useful for installing arch-specific frontends for default handlers or just for overriding them. Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Richard Henderson <rth@twiddle.net Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--arch/alpha/kernel/binfmt_loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/kernel/binfmt_loader.c b/arch/alpha/kernel/binfmt_loader.c
index 4a0af906b00a..3fcfad410130 100644
--- a/arch/alpha/kernel/binfmt_loader.c
+++ b/arch/alpha/kernel/binfmt_loader.c
@@ -46,6 +46,6 @@ static struct linux_binfmt loader_format = {
static int __init init_loader_binfmt(void)
{
- return register_binfmt(&loader_format);
+ return insert_binfmt(&loader_format);
}
arch_initcall(init_loader_binfmt);