diff -u -r --new-file linux-2.4.0-test11/fs/binfmt_elf.c linux-2.4.0-test11-establish_pte/fs/binfmt_elf.c
--- linux-2.4.0-test11/fs/binfmt_elf.c	Fri Oct 27 20:04:43 2000
+++ linux-2.4.0-test11-establish_pte/fs/binfmt_elf.c	Wed Dec  6 20:52:00 2000
@@ -247,6 +247,8 @@
 		goto out;
 	if (!elf_check_arch(interp_elf_ex))
 		goto out;
+        if (interp_elf_ex->e_ident[EI_CLASS] != ELF_CLASS)
+                goto out;
 	if (!interpreter->f_op->mmap)
 		goto out;
 
@@ -422,6 +424,8 @@
 	if (elf_ex.e_type != ET_EXEC && elf_ex.e_type != ET_DYN)
 		goto out;
 	if (!elf_check_arch(&elf_ex))
+		goto out;
+	if (elf_ex.e_ident[EI_CLASS] != ELF_CLASS)
 		goto out;
 	if (!bprm->file->f_op||!bprm->file->f_op->mmap)
 		goto out;
