patch-2.3.9 linux/fs/binfmt_aout.c

Next file: linux/fs/binfmt_java.c
Previous file: linux/fs/bad_inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.8/linux/fs/binfmt_aout.c linux/fs/binfmt_aout.c
@@ -323,7 +323,7 @@
 
 	if (N_MAGIC(ex) == ZMAGIC && ex.a_text &&
 	    bprm->dentry->d_inode->i_op &&
-	    bprm->dentry->d_inode->i_op->bmap &&
+	    bprm->dentry->d_inode->i_op->get_block &&
 	    (fd_offset < bprm->dentry->d_inode->i_sb->s_blocksize)) {
 		printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n");
 		return -ENOEXEC;
@@ -396,7 +396,7 @@
 		fd = open_dentry(bprm->dentry, O_RDONLY);
 		if (fd < 0)
 			return fd;
-		file = fcheck(fd);
+		file = fget(fd);
 
 		if ((fd_offset & ~PAGE_MASK) != 0) {
 			printk(KERN_WARNING 
@@ -406,6 +406,7 @@
 		}
 
 		if (!file->f_op || !file->f_op->mmap || ((fd_offset & ~PAGE_MASK) != 0)) {
+			fput(file);
 			sys_close(fd);
 			do_brk(0, ex.a_text+ex.a_data);
 			read_exec(bprm->dentry, fd_offset,
@@ -422,6 +423,7 @@
 			fd_offset);
 
 		if (error != N_TXTADDR(ex)) {
+			fput(file);
 			sys_close(fd);
 			send_sig(SIGKILL, current, 0);
 			return error;
@@ -431,6 +433,7 @@
 				PROT_READ | PROT_WRITE | PROT_EXEC,
 				MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
 				fd_offset + ex.a_text);
+		fput(file);
 		sys_close(fd);
 		if (error != N_DATADDR(ex)) {
 			send_sig(SIGKILL, current, 0);

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