Re: [PATCH] alpha: binfmt_aout fix

From: Al Viro
Date: Fri Apr 24 2009 - 11:06:03 EST


On Fri, Apr 24, 2009 at 06:47:38PM +0400, Ivan Kokshaysky wrote:
> 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.

Hmm... How about always doing list_add_tail() instead?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/