diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_aout.c | 1 | ||||
-rw-r--r-- | fs/binfmt_elf.c | 1 | ||||
-rw-r--r-- | fs/hugetlbfs/inode.c | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 009b8920c1ff..dd9baabaf016 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -316,6 +316,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
316 | current->mm->brk = ex.a_bss + | 316 | current->mm->brk = ex.a_bss + |
317 | (current->mm->start_brk = N_BSSADDR(ex)); | 317 | (current->mm->start_brk = N_BSSADDR(ex)); |
318 | current->mm->free_area_cache = current->mm->mmap_base; | 318 | current->mm->free_area_cache = current->mm->mmap_base; |
319 | current->mm->cached_hole_size = 0; | ||
319 | 320 | ||
320 | set_mm_counter(current->mm, rss, 0); | 321 | set_mm_counter(current->mm, rss, 0); |
321 | current->mm->mmap = NULL; | 322 | current->mm->mmap = NULL; |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index f8f6b6b76179..7976a238f0a3 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -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) { |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 2af3338f891b..3a9b6d179cbd 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -122,6 +122,9 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
122 | 122 | ||
123 | start_addr = mm->free_area_cache; | 123 | start_addr = mm->free_area_cache; |
124 | 124 | ||
125 | if (len <= mm->cached_hole_size) | ||
126 | start_addr = TASK_UNMAPPED_BASE; | ||
127 | |||
125 | full_search: | 128 | full_search: |
126 | addr = ALIGN(start_addr, HPAGE_SIZE); | 129 | addr = ALIGN(start_addr, HPAGE_SIZE); |
127 | 130 | ||