patch-2.4.3 linux/fs/binfmt_aout.c
Next file: linux/fs/binfmt_elf.c
Previous file: linux/fs/bfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Mon Mar 19 12:34:56 2001
- Orig file:
v2.4.2/linux/fs/binfmt_aout.c
- Orig date:
Wed Feb 21 18:20:38 2001
diff -u --recursive --new-file v2.4.2/linux/fs/binfmt_aout.c linux/fs/binfmt_aout.c
@@ -342,7 +342,7 @@
error = bprm->file->f_op->read(bprm->file, (char *)text_addr,
ex.a_text+ex.a_data, &pos);
- if (error < 0) {
+ if ((signed long)error < 0) {
send_sig(SIGKILL, current, 0);
return error;
}
@@ -377,24 +377,24 @@
goto beyond_if;
}
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
error = do_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
PROT_READ | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (error != N_TXTADDR(ex)) {
send_sig(SIGKILL, current, 0);
return error;
}
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (error != N_DATADDR(ex)) {
send_sig(SIGKILL, current, 0);
return error;
@@ -476,12 +476,12 @@
goto out;
}
/* Now use mmap to map the library into memory. */
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
error = do_mmap(file, start_addr, ex.a_text + ex.a_data,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE,
N_TXTOFF(ex));
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
retval = error;
if (error != start_addr)
goto out;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)