diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index b06240b67199..fd5f54b9c863 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -26,6 +26,15 @@ # define nmi_uaccess_okay() true #endif +/* + * Blindly accessing user memory from NMI context can be dangerous + * if we're in the middle of switching the current user task or switching + * the loaded mm. + */ +#ifndef nmi_uaccess_okay +# define nmi_uaccess_okay() true +#endif + #ifdef CONFIG_MMU /*