diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index adefc1131f27..552c8d8e77ad 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/cpu.h> | 33 | #include <linux/cpu.h> |
34 | #include <linux/cgroup.h> | 34 | #include <linux/cgroup.h> |
35 | #include <linux/security.h> | 35 | #include <linux/security.h> |
36 | #include <linux/hugetlb.h> | ||
36 | #include <linux/swap.h> | 37 | #include <linux/swap.h> |
37 | #include <linux/syscalls.h> | 38 | #include <linux/syscalls.h> |
38 | #include <linux/jiffies.h> | 39 | #include <linux/jiffies.h> |
@@ -307,6 +308,14 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) | |||
307 | } | 308 | } |
308 | 309 | ||
309 | /* | 310 | /* |
311 | * Clear hugetlb-related page reserves for children. This only | ||
312 | * affects MAP_PRIVATE mappings. Faults generated by the child | ||
313 | * are not guaranteed to succeed, even if read-only | ||
314 | */ | ||
315 | if (is_vm_hugetlb_page(tmp)) | ||
316 | reset_vma_resv_huge_pages(tmp); | ||
317 | |||
318 | /* | ||
310 | * Link in the new vma and copy the page table entries. | 319 | * Link in the new vma and copy the page table entries. |
311 | */ | 320 | */ |
312 | *pprev = tmp; | 321 | *pprev = tmp; |