git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Bluetooth] Fix reference count when connection lookup fails
[pandora-kernel.git]
/
fs
/
binfmt_flat.c
diff --git
a/fs/binfmt_flat.c
b/fs/binfmt_flat.c
index
69f44dc
..
a62fd40
100644
(file)
--- a/
fs/binfmt_flat.c
+++ b/
fs/binfmt_flat.c
@@
-16,7
+16,6
@@
*/
#include <linux/module.h>
*/
#include <linux/module.h>
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
@@
-428,7
+427,6
@@
static int load_flat_file(struct linux_binprm * bprm,
loff_t fpos;
unsigned long start_code, end_code;
int ret;
loff_t fpos;
unsigned long start_code, end_code;
int ret;
- int exec_fileno;
hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */
inode = bprm->file->f_dentry->d_inode;
hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */
inode = bprm->file->f_dentry->d_inode;
@@
-502,25
+500,16
@@
static int load_flat_file(struct linux_binprm * bprm,
goto err;
}
goto err;
}
- /* check file descriptor */
- exec_fileno = get_unused_fd();
- if (exec_fileno < 0) {
- ret = -EMFILE;
- goto err;
- }
- get_file(bprm->file);
- fd_install(exec_fileno, bprm->file);
-
/* Flush all traces of the currently running executable */
if (id == 0) {
result = flush_old_exec(bprm);
if (result) {
ret = result;
/* Flush all traces of the currently running executable */
if (id == 0) {
result = flush_old_exec(bprm);
if (result) {
ret = result;
- goto err
_close
;
+ goto err;
}
/* OK, This is the point of no return */
}
/* OK, This is the point of no return */
- set_personality(PER_LINUX);
+ set_personality(PER_LINUX
_32BIT
);
}
/*
}
/*
@@
-548,7
+537,7
@@
static int load_flat_file(struct linux_binprm * bprm,
textpos = (unsigned long) -ENOMEM;
printk("Unable to mmap process text, errno %d\n", (int)-textpos);
ret = textpos;
textpos = (unsigned long) -ENOMEM;
printk("Unable to mmap process text, errno %d\n", (int)-textpos);
ret = textpos;
- goto err
_close
;
+ goto err;
}
down_write(¤t->mm->mmap_sem);
}
down_write(¤t->mm->mmap_sem);
@@
-564,7
+553,7
@@
static int load_flat_file(struct linux_binprm * bprm,
(int)-datapos);
do_munmap(current->mm, textpos, text_len);
ret = realdatastart;
(int)-datapos);
do_munmap(current->mm, textpos, text_len);
ret = realdatastart;
- goto err
_close
;
+ goto err;
}
datapos = realdatastart + MAX_SHARED_LIBS * sizeof(unsigned long);
}
datapos = realdatastart + MAX_SHARED_LIBS * sizeof(unsigned long);
@@
-587,7
+576,7
@@
static int load_flat_file(struct linux_binprm * bprm,
do_munmap(current->mm, textpos, text_len);
do_munmap(current->mm, realdatastart, data_len + extra);
ret = result;
do_munmap(current->mm, textpos, text_len);
do_munmap(current->mm, realdatastart, data_len + extra);
ret = result;
- goto err
_close
;
+ goto err;
}
reloc = (unsigned long *) (datapos+(ntohl(hdr->reloc_start)-text_len));
}
reloc = (unsigned long *) (datapos+(ntohl(hdr->reloc_start)-text_len));
@@
-606,7
+595,7
@@
static int load_flat_file(struct linux_binprm * bprm,
printk("Unable to allocate RAM for process text/data, errno %d\n",
(int)-textpos);
ret = textpos;
printk("Unable to allocate RAM for process text/data, errno %d\n",
(int)-textpos);
ret = textpos;
- goto err
_close
;
+ goto err;
}
realdatastart = textpos + ntohl(hdr->data_start);
}
realdatastart = textpos + ntohl(hdr->data_start);
@@
-652,7
+641,7
@@
static int load_flat_file(struct linux_binprm * bprm,
do_munmap(current->mm, textpos, text_len + data_len + extra +
MAX_SHARED_LIBS * sizeof(unsigned long));
ret = result;
do_munmap(current->mm, textpos, text_len + data_len + extra +
MAX_SHARED_LIBS * sizeof(unsigned long));
ret = result;
- goto err
_close
;
+ goto err;
}
}
}
}
@@
-717,7
+706,7
@@
static int load_flat_file(struct linux_binprm * bprm,
addr = calc_reloc(*rp, libinfo, id, 0);
if (addr == RELOC_FAILED) {
ret = -ENOEXEC;
addr = calc_reloc(*rp, libinfo, id, 0);
if (addr == RELOC_FAILED) {
ret = -ENOEXEC;
- goto err
_close
;
+ goto err;
}
*rp = addr;
}
}
*rp = addr;
}
@@
-747,7
+736,7
@@
static int load_flat_file(struct linux_binprm * bprm,
rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1);
if (rp == (unsigned long *)RELOC_FAILED) {
ret = -ENOEXEC;
rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1);
if (rp == (unsigned long *)RELOC_FAILED) {
ret = -ENOEXEC;
- goto err
_close
;
+ goto err;
}
/* Get the pointer's value. */
}
/* Get the pointer's value. */
@@
-762,7
+751,7
@@
static int load_flat_file(struct linux_binprm * bprm,
addr = calc_reloc(addr, libinfo, id, 0);
if (addr == RELOC_FAILED) {
ret = -ENOEXEC;
addr = calc_reloc(addr, libinfo, id, 0);
if (addr == RELOC_FAILED) {
ret = -ENOEXEC;
- goto err
_close
;
+ goto err;
}
/* Write back the relocated pointer. */
}
/* Write back the relocated pointer. */
@@
-783,8
+772,6
@@
static int load_flat_file(struct linux_binprm * bprm,
stack_len);
return 0;
stack_len);
return 0;
-err_close:
- sys_close(exec_fileno);
err:
return ret;
}
err:
return ret;
}