aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index ce9423bb2de3..7976a238f0a3 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -251,7 +251,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr * exec,
251 } 251 }
252 252
253 /* Populate argv and envp */ 253 /* Populate argv and envp */
254 p = current->mm->arg_start; 254 p = current->mm->arg_end = current->mm->arg_start;
255 while (argc-- > 0) { 255 while (argc-- > 0) {
256 size_t len; 256 size_t len;
257 __put_user((elf_addr_t)p, argv++); 257 __put_user((elf_addr_t)p, argv++);
@@ -775,6 +775,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
775 change some of these later */ 775 change some of these later */
776 set_mm_counter(current->mm, rss, 0); 776 set_mm_counter(current->mm, rss, 0);
777 current->mm->free_area_cache = current->mm->mmap_base; 777 current->mm->free_area_cache = current->mm->mmap_base;
778 current->mm->cached_hole_size = 0;
778 retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP), 779 retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP),
779 executable_stack); 780 executable_stack);
780 if (retval < 0) { 781 if (retval < 0) {
@@ -1125,7 +1126,7 @@ static int dump_write(struct file *file, const void *addr, int nr)
1125 return file->f_op->write(file, addr, nr, &file->f_pos) == nr; 1126 return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
1126} 1127}
1127 1128
1128static int dump_seek(struct file *file, off_t off) 1129static int dump_seek(struct file *file, loff_t off)
1129{ 1130{
1130 if (file->f_op->llseek) { 1131 if (file->f_op->llseek) {
1131 if (file->f_op->llseek(file, off, 0) != off) 1132 if (file->f_op->llseek(file, off, 0) != off)
@@ -1301,7 +1302,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
1301static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, 1302static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
1302 struct mm_struct *mm) 1303 struct mm_struct *mm)
1303{ 1304{
1304 int i, len; 1305 unsigned int i, len;
1305 1306
1306 /* first copy the parameters from user space */ 1307 /* first copy the parameters from user space */
1307 memset(psinfo, 0, sizeof(struct elf_prpsinfo)); 1308 memset(psinfo, 0, sizeof(struct elf_prpsinfo));