x86/mm/64: In vmalloc_fault(), use CR3 instead of current->active_mm
[cascardo/linux.git] / arch / x86 / mm / fault.c
index 7d1fa7c..ca44e2e 100644 (file)
@@ -439,7 +439,7 @@ static noinline int vmalloc_fault(unsigned long address)
         * happen within a race in page table update. In the later
         * case just flush:
         */
-       pgd = pgd_offset(current->active_mm, address);
+       pgd = (pgd_t *)__va(read_cr3()) + pgd_index(address);
        pgd_ref = pgd_offset_k(address);
        if (pgd_none(*pgd_ref))
                return -1;