diff options
| -rw-r--r-- | fs/binfmt_elf.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index b7c1603cd4bd..7c1e65d54872 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
| @@ -501,22 +501,22 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, | |||
| 501 | } | 501 | } |
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | /* | 504 | if (last_bss > elf_bss) { |
| 505 | * Now fill out the bss section. First pad the last page up | 505 | /* |
| 506 | * to the page boundary, and then perform a mmap to make sure | 506 | * Now fill out the bss section. First pad the last page up |
| 507 | * that there are zero-mapped pages up to and including the | 507 | * to the page boundary, and then perform a mmap to make sure |
| 508 | * last bss page. | 508 | * that there are zero-mapped pages up to and including the |
| 509 | */ | 509 | * last bss page. |
| 510 | if (padzero(elf_bss)) { | 510 | */ |
| 511 | error = -EFAULT; | 511 | if (padzero(elf_bss)) { |
| 512 | goto out_close; | 512 | error = -EFAULT; |
| 513 | } | 513 | goto out_close; |
| 514 | } | ||
| 514 | 515 | ||
| 515 | /* What we have mapped so far */ | 516 | /* What we have mapped so far */ |
| 516 | elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1); | 517 | elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1); |
| 517 | 518 | ||
| 518 | /* Map the last of the bss segment */ | 519 | /* Map the last of the bss segment */ |
| 519 | if (last_bss > elf_bss) { | ||
| 520 | down_write(¤t->mm->mmap_sem); | 520 | down_write(¤t->mm->mmap_sem); |
| 521 | error = do_brk(elf_bss, last_bss - elf_bss); | 521 | error = do_brk(elf_bss, last_bss - elf_bss); |
| 522 | up_write(¤t->mm->mmap_sem); | 522 | up_write(¤t->mm->mmap_sem); |
