x86/uaccess: Move thread_info::uaccess_err and thread_info::sig_on_uaccess_err to...
[cascardo/linux.git] / arch / x86 / mm / fault.c
index 7d1fa7c..69be03d 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;
@@ -737,7 +737,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
                 * In this case we need to make sure we're not recursively
                 * faulting through the emulate_vsyscall() logic.
                 */
-               if (current_thread_info()->sig_on_uaccess_error && signal) {
+               if (current->thread.sig_on_uaccess_error && signal) {
                        tsk->thread.trap_nr = X86_TRAP_PF;
                        tsk->thread.error_code = error_code | PF_USER;
                        tsk->thread.cr2 = address;