patch-2.3.10 linux/arch/sparc64/kernel/binfmt_aout32.c
Next file: linux/arch/sparc64/kernel/ioctl32.c
Previous file: linux/arch/sparc64/defconfig
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Thu Jul 1 17:33:12 1999
- Orig file:
v2.3.9/linux/arch/sparc64/kernel/binfmt_aout32.c
- Orig date:
Wed Jun 30 13:38:19 1999
diff -u --recursive --new-file v2.3.9/linux/arch/sparc64/kernel/binfmt_aout32.c linux/arch/sparc64/kernel/binfmt_aout32.c
@@ -311,9 +311,10 @@
fd = open_dentry(bprm->dentry, O_RDONLY);
if (fd < 0)
return fd;
- file = fcheck(fd);
+ file = fget(fd);
if (!file->f_op || !file->f_op->mmap) {
+ fput(fd);
sys_close(fd);
do_brk(0, ex.a_text+ex.a_data);
read_exec(bprm->dentry, fd_offset,
@@ -327,6 +328,7 @@
fd_offset);
if (error != N_TXTADDR(ex)) {
+ fput(file);
sys_close(fd);
send_sig(SIGKILL, current, 0);
return error;
@@ -336,6 +338,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)