patch-2.1.36 linux/fs/exec.c

Next file: linux/fs/ext2/super.c
Previous file: linux/fs/dcache.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/fs/exec.c linux/fs/exec.c
@@ -41,6 +41,7 @@
 #include <linux/personality.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/init.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -65,7 +66,7 @@
 
 static struct linux_binfmt *formats = (struct linux_binfmt *) NULL;
 
-void binfmt_setup(void)
+__initfunc(void binfmt_setup(void))
 {
 #ifdef CONFIG_BINFMT_ELF
 	init_elf_binfmt();
@@ -533,7 +534,7 @@
 		if (IS_NOSUID(bprm->inode)
 		    || (current->flags & PF_PTRACED)
 		    || (current->fs->count > 1)
-		    || (current->sig->count > 1)
+		    || (atomic_read(&current->sig->count) > 1)
 		    || (current->files->count > 1)) {
 			if (!suser())
 				return -EPERM;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov