patch-2.3.50 linux/fs/exec.c

Next file: linux/fs/fat/fatfs_syms.c
Previous file: linux/fs/devpts/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.49/linux/fs/exec.c linux/fs/exec.c
@@ -84,6 +84,7 @@
 	struct list_head * l = NULL;
 	int fd, error;
 
+	lock_kernel();
 	if (inode->i_sb)
 		l = &inode->i_sb->s_files;
 
@@ -111,6 +112,7 @@
 		fd_install(fd, f);
 		dget(dentry);
 	}
+	unlock_kernel();
 	return fd;
 
 out_filp:
@@ -120,6 +122,7 @@
 out_fd:
 	put_unused_fd(fd);
 out:
+	unlock_kernel();
 	return error;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)