Use list_head in binfmt handling
Switch single-linked binfmt formats list to usual list_head's. This leads to one-liners in register_binfmt() and unregister_binfmt(). The downside is one pointer more in struct linux_binfmt. This is not a problem, since the set of registered binfmts on typical box is very small -- (ELF + something distro enabled for you). Test-booted, played with executable .txt files, modprobe/rmmod binfmt_misc. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
deba0f49b9
commit
e4dc1b14d8
@@ -47,8 +47,11 @@ static int irix_core_dump(long signr, struct pt_regs * regs,
|
||||
struct file *file);
|
||||
|
||||
static struct linux_binfmt irix_format = {
|
||||
NULL, THIS_MODULE, load_irix_binary, load_irix_library,
|
||||
irix_core_dump, PAGE_SIZE
|
||||
.module = THIS_MODULE,
|
||||
.load_binary = load_irix_binary,
|
||||
.load_shlib = load_irix_library,
|
||||
.core_dump = irix_core_dump,
|
||||
.min_coredump = PAGE_SIZE,
|
||||
};
|
||||
|
||||
/* Debugging routines. */
|
||||
|
Reference in New Issue
Block a user