On Fri, May 05, 2017 at 11:17:00AM -0700, Ricardo Neri wrote:
> Up to this point, only fault.c used the definitions of the page fault error
> codes. Thus, it made sense to keep them within such file. Other portions of
> code might be interested in those definitions too. For instance, the User-
> Mode Instruction Prevention emulation code will use such definitions to
> emulate a page fault when it is unable to successfully copy the results
> of the emulated instructions to user space.
> 
> While relocating the error code enumeration, the prefix X86_ is used to
> make it consistent with the rest of the definitions in traps.h. Of course,
> code using the enumeration had to be updated as well. No functional changes
> were performed.
> 
> Cc: Thomas Gleixner <t...@linutronix.de>
> Cc: Ingo Molnar <mi...@redhat.com>
> Cc: "H. Peter Anvin" <h...@zytor.com>
> Cc: Andy Lutomirski <l...@kernel.org>
> Cc: "Kirill A. Shutemov" <kirill.shute...@linux.intel.com>
> Cc: Josh Poimboeuf <jpoim...@redhat.com>
> Cc: Dave Hansen <dave.han...@linux.intel.com>
> Cc: Paul Gortmaker <paul.gortma...@windriver.com>
> Cc: x...@kernel.org
> Reviewed-by: Andy Lutomirski <l...@kernel.org>
> Signed-off-by: Ricardo Neri <ricardo.neri-calde...@linux.intel.com>
> ---
>  arch/x86/include/asm/traps.h | 18 +++++++++
>  arch/x86/mm/fault.c          | 88 
> +++++++++++++++++---------------------------
>  2 files changed, 52 insertions(+), 54 deletions(-)

...

> @@ -1382,7 +1362,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long 
> error_code,
>        * space check, thus avoiding the deadlock:
>        */
>       if (unlikely(!down_read_trylock(&mm->mmap_sem))) {
> -             if ((error_code & PF_USER) == 0 &&
> +             if ((error_code & X86_PF_USER) == 0 &&

        if (!(error_code & X86_PF_USER))

With that fixed:

Reviewed-by: Borislav Petkov <b...@suse.de>

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to