diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 13:39:59 +0200 | 
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 13:39:59 +0200 | 
| commit | 5e13a0c5ec05d382b488a691dfb8af015b1dea1e (patch) | |
| tree | 7a06dfa1f7661f8908193f2437b32452520221d3 /fs/binfmt_elf.c | |
| parent | b615b57a124a4af7b68196bc2fb8acc236041fa2 (diff) | |
| parent | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (diff) | |
Merge remote-tracking branch 'airlied/drm-core-next' into drm-intel-next-queued
Backmerge of drm-next to resolve a few ugly conflicts and to get a few
fixes from 3.4-rc6 (which drm-next has already merged). Note that this
merge also restricts the stencil cache lra evict policy workaround to
snb (as it should) - I had to frob the code anyway because the
CM0_MASK_SHIFT define died in the masked bit cleanups.
We need the backmerge to get Paulo Zanoni's infoframe regression fix
for gm45 - further bugfixes from him touch the same area and would
needlessly conflict.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'fs/binfmt_elf.c')
| -rw-r--r-- | fs/binfmt_elf.c | 23 | 
1 files changed, 6 insertions, 17 deletions
| diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 48ffb3dc610a..16f735417072 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -82,9 +82,7 @@ static int set_brk(unsigned long start, unsigned long end)  	end = ELF_PAGEALIGN(end);  	if (end > start) {  		unsigned long addr; -		down_write(¤t->mm->mmap_sem); -		addr = do_brk(start, end - start); -		up_write(¤t->mm->mmap_sem); +		addr = vm_brk(start, end - start);  		if (BAD_ADDR(addr))  			return addr;  	} @@ -514,9 +512,7 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,  		elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1);  		/* Map the last of the bss segment */ -		down_write(¤t->mm->mmap_sem); -		error = do_brk(elf_bss, last_bss - elf_bss); -		up_write(¤t->mm->mmap_sem); +		error = vm_brk(elf_bss, last_bss - elf_bss);  		if (BAD_ADDR(error))  			goto out_close;  	} @@ -962,10 +958,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)  		   and some applications "depend" upon this behavior.  		   Since we do not have the power to recompile these, we  		   emulate the SVr4 behavior. Sigh. */ -		down_write(¤t->mm->mmap_sem); -		error = do_mmap(NULL, 0, PAGE_SIZE, PROT_READ | PROT_EXEC, +		error = vm_mmap(NULL, 0, PAGE_SIZE, PROT_READ | PROT_EXEC,  				MAP_FIXED | MAP_PRIVATE, 0); -		up_write(¤t->mm->mmap_sem);  	}  #ifdef ELF_PLAT_INIT @@ -1050,8 +1044,7 @@ static int load_elf_library(struct file *file)  		eppnt++;  	/* Now use mmap to map the library into memory. */ -	down_write(¤t->mm->mmap_sem); -	error = do_mmap(file, +	error = vm_mmap(file,  			ELF_PAGESTART(eppnt->p_vaddr),  			(eppnt->p_filesz +  			 ELF_PAGEOFFSET(eppnt->p_vaddr)), @@ -1059,7 +1052,6 @@ static int load_elf_library(struct file *file)  			MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE,  			(eppnt->p_offset -  			 ELF_PAGEOFFSET(eppnt->p_vaddr))); -	up_write(¤t->mm->mmap_sem);  	if (error != ELF_PAGESTART(eppnt->p_vaddr))  		goto out_free_ph; @@ -1072,11 +1064,8 @@ static int load_elf_library(struct file *file)  	len = ELF_PAGESTART(eppnt->p_filesz + eppnt->p_vaddr +  			    ELF_MIN_ALIGN - 1);  	bss = eppnt->p_memsz + eppnt->p_vaddr; -	if (bss > len) { -		down_write(¤t->mm->mmap_sem); -		do_brk(len, bss - len); -		up_write(¤t->mm->mmap_sem); -	} +	if (bss > len) +		vm_brk(len, bss - len);  	error = 0;  out_free_ph: | 
