binfmt_misc: fix binfmt_misc priority
authorJan Sembera <[email protected]>
Thu, 9 Sep 2010 23:37:54 +0000 (16:37 -0700)
committerLinus Torvalds <[email protected]>
Fri, 10 Sep 2010 01:57:24 +0000 (18:57 -0700)
Commit 74641f584da ("alpha: binfmt_aout fix") (May 2009) introduced a
regression - binfmt_misc is now consulted after binfmt_elf, which will
unfortunately break ia32el.  ia32 ELF binaries on ia64 used to be matched
using binfmt_misc and executed using wrapper.  As 32bit binaries are now
matched by binfmt_elf before bindmt_misc kicks in, the wrapper is ignored.

The fix increases precedence of binfmt_misc to the original state.

Signed-off-by: Jan Sembera <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Richard Henderson <[email protected]
Cc: <[email protected]> [2.6.everything.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/binfmt_misc.c

index a7528b91393676bb1f1affa72f6b78f38206d4c5..fd0cc0bf9a40396a150ad77b69bf5284531d6125 100644 (file)
@@ -724,7 +724,7 @@ static int __init init_misc_binfmt(void)
 {
        int err = register_filesystem(&bm_fs_type);
        if (!err) {
-               err = register_binfmt(&misc_format);
+               err = insert_binfmt(&misc_format);
                if (err)
                        unregister_filesystem(&bm_fs_type);
        }