summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_aout.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
commitaba344fdfed81b2c03d6114c54cfd73a486aa10b (patch)
treed032d8430bf1234c3ecc6f6330d6de6e887e5963 /fs/binfmt_aout.c
parent40c138bfc6d37dbff5339f84575db1e3cec6e34e (diff)
Merge with Linux 2.3.9.
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r--fs/binfmt_aout.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index 2b886a147..4723c6802 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -323,7 +323,7 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
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 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
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 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
}
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 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
fd_offset);
if (error != N_TXTADDR(ex)) {
+ fput(file);
sys_close(fd);
send_sig(SIGKILL, current, 0);
return error;
@@ -431,6 +433,7 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
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);