UPSTREAM: arm64: Disable PAN on uaccess_enable()
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / include / asm / uaccess.h
index 955c6e58a624efb5ce949da0dfca4d87f66c0ef7..efafdf39cb3b224041deed877f011958b3c06650 100644 (file)
@@ -192,7 +192,7 @@ do {                                                                        \
 
 #define __uaccess_enable(alt)                                          \
 do {                                                                   \
-       if (uaccess_ttbr0_enable())                                     \
+       if (!uaccess_ttbr0_enable())                                    \
                asm(ALTERNATIVE("nop", SET_PSTATE_PAN(0), alt,          \
                                CONFIG_ARM64_PAN));                     \
 } while (0)