diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 07cc743698d3..4e55eedba8d6 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -469,7 +469,7 @@ void __init fork_init(void) | |||
469 | /* create a slab on which task_structs can be allocated */ | 469 | /* create a slab on which task_structs can be allocated */ |
470 | task_struct_cachep = kmem_cache_create("task_struct", | 470 | task_struct_cachep = kmem_cache_create("task_struct", |
471 | arch_task_struct_size, align, | 471 | arch_task_struct_size, align, |
472 | SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, NULL); | 472 | SLAB_PANIC|SLAB_ACCOUNT, NULL); |
473 | #endif | 473 | #endif |
474 | 474 | ||
475 | /* do the arch specific task caches init */ | 475 | /* do the arch specific task caches init */ |
@@ -817,8 +817,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p, | |||
817 | init_rwsem(&mm->mmap_sem); | 817 | init_rwsem(&mm->mmap_sem); |
818 | INIT_LIST_HEAD(&mm->mmlist); | 818 | INIT_LIST_HEAD(&mm->mmlist); |
819 | mm->core_state = NULL; | 819 | mm->core_state = NULL; |
820 | atomic_long_set(&mm->nr_ptes, 0); | 820 | mm_pgtables_bytes_init(mm); |
821 | mm_nr_pmds_init(mm); | ||
822 | mm->map_count = 0; | 821 | mm->map_count = 0; |
823 | mm->locked_vm = 0; | 822 | mm->locked_vm = 0; |
824 | mm->pinned_vm = 0; | 823 | mm->pinned_vm = 0; |
@@ -872,12 +871,9 @@ static void check_mm(struct mm_struct *mm) | |||
872 | "mm:%p idx:%d val:%ld\n", mm, i, x); | 871 | "mm:%p idx:%d val:%ld\n", mm, i, x); |
873 | } | 872 | } |
874 | 873 | ||
875 | if (atomic_long_read(&mm->nr_ptes)) | 874 | if (mm_pgtables_bytes(mm)) |
876 | pr_alert("BUG: non-zero nr_ptes on freeing mm: %ld\n", | 875 | pr_alert("BUG: non-zero pgtables_bytes on freeing mm: %ld\n", |
877 | atomic_long_read(&mm->nr_ptes)); | 876 | mm_pgtables_bytes(mm)); |
878 | if (mm_nr_pmds(mm)) | ||
879 | pr_alert("BUG: non-zero nr_pmds on freeing mm: %ld\n", | ||
880 | mm_nr_pmds(mm)); | ||
881 | 877 | ||
882 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS | 878 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS |
883 | VM_BUG_ON_MM(mm->pmd_huge_pte, mm); | 879 | VM_BUG_ON_MM(mm->pmd_huge_pte, mm); |
@@ -2209,18 +2205,18 @@ void __init proc_caches_init(void) | |||
2209 | sighand_cachep = kmem_cache_create("sighand_cache", | 2205 | sighand_cachep = kmem_cache_create("sighand_cache", |
2210 | sizeof(struct sighand_struct), 0, | 2206 | sizeof(struct sighand_struct), 0, |
2211 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_TYPESAFE_BY_RCU| | 2207 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_TYPESAFE_BY_RCU| |
2212 | SLAB_NOTRACK|SLAB_ACCOUNT, sighand_ctor); | 2208 | SLAB_ACCOUNT, sighand_ctor); |
2213 | signal_cachep = kmem_cache_create("signal_cache", | 2209 | signal_cachep = kmem_cache_create("signal_cache", |
2214 | sizeof(struct signal_struct), 0, | 2210 | sizeof(struct signal_struct), 0, |
2215 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, | 2211 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, |
2216 | NULL); | 2212 | NULL); |
2217 | files_cachep = kmem_cache_create("files_cache", | 2213 | files_cachep = kmem_cache_create("files_cache", |
2218 | sizeof(struct files_struct), 0, | 2214 | sizeof(struct files_struct), 0, |
2219 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, | 2215 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, |
2220 | NULL); | 2216 | NULL); |
2221 | fs_cachep = kmem_cache_create("fs_cache", | 2217 | fs_cachep = kmem_cache_create("fs_cache", |
2222 | sizeof(struct fs_struct), 0, | 2218 | sizeof(struct fs_struct), 0, |
2223 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, | 2219 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, |
2224 | NULL); | 2220 | NULL); |
2225 | /* | 2221 | /* |
2226 | * FIXME! The "sizeof(struct mm_struct)" currently includes the | 2222 | * FIXME! The "sizeof(struct mm_struct)" currently includes the |
@@ -2231,7 +2227,7 @@ void __init proc_caches_init(void) | |||
2231 | */ | 2227 | */ |
2232 | mm_cachep = kmem_cache_create("mm_struct", | 2228 | mm_cachep = kmem_cache_create("mm_struct", |
2233 | sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, | 2229 | sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, |
2234 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, | 2230 | SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, |
2235 | NULL); | 2231 | NULL); |
2236 | vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT); | 2232 | vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT); |
2237 | mmap_init(); | 2233 | mmap_init(); |