mm: Fix boot crash in mm_alloc()
[deliverable/linux.git] / include / linux / mm_types.h
index 6fe96c19f85e82bbfc29fce8a69e87013dc26fce..027935c86c688df2315d7ea4862d2c8e233ab8aa 100644 (file)
@@ -264,6 +264,8 @@ struct mm_struct {
 
        struct linux_binfmt *binfmt;
 
+       cpumask_var_t cpu_vm_mask_var;
+
        /* Architecture-specific MM context */
        mm_context_t context;
 
@@ -302,21 +304,27 @@ struct mm_struct {
        struct task_struct __rcu *owner;
 #endif
 
-#ifdef CONFIG_PROC_FS
        /* store ref to file /proc/<pid>/exe symlink points to */
        struct file *exe_file;
        unsigned long num_exe_file_vmas;
-#endif
 #ifdef CONFIG_MMU_NOTIFIER
        struct mmu_notifier_mm *mmu_notifier_mm;
 #endif
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
        pgtable_t pmd_huge_pte; /* protected by page_table_lock */
 #endif
-
-       cpumask_var_t cpu_vm_mask_var;
+#ifdef CONFIG_CPUMASK_OFFSTACK
+       struct cpumask cpumask_allocation;
+#endif
 };
 
+static inline void mm_init_cpumask(struct mm_struct *mm)
+{
+#ifdef CONFIG_CPUMASK_OFFSTACK
+       mm->cpu_vm_mask_var = &mm->cpumask_allocation;
+#endif
+}
+
 /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
 static inline cpumask_t *mm_cpumask(struct mm_struct *mm)
 {
This page took 0.045172 seconds and 5 git commands to generate.