aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2014-06-09 16:19:19 +0800
committerAlex Shi <alex.shi@linaro.org>2014-06-09 16:19:19 +0800
commite2a3fd224d41eef99d325a2462abb21ccee76812 (patch)
treee2192d247e1384db0bc2e0a28fdc56221a5492a7
parent3b8d7f4db34913c8e2ea0177723784b646f7424e (diff)
parentcd875016b2e6e2a131588b8e47eb9b7acf7a58b1 (diff)
downloadlinux-e2a3fd224d41eef99d325a2462abb21ccee76812.tar.gz
Merge branch 'v3.10/topic/misc' into linux-linaro-lsk
-rw-r--r--arch/arm64/include/asm/uaccess.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 8e8df0135f4..3bf8f4e99a5 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -167,9 +167,10 @@ do { \
#define get_user(x, ptr) \
({ \
- might_sleep(); \
- access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) ? \
- __get_user((x), (ptr)) : \
+ __typeof__(*(ptr)) __user *__p = (ptr); \
+ might_fault(); \
+ access_ok(VERIFY_READ, __p, sizeof(*__p)) ? \
+ __get_user((x), __p) : \
((x) = 0, -EFAULT); \
})
@@ -228,9 +229,10 @@ do { \
#define put_user(x, ptr) \
({ \
- might_sleep(); \
- access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) ? \
- __put_user((x), (ptr)) : \
+ __typeof__(*(ptr)) __user *__p = (ptr); \
+ might_fault(); \
+ access_ok(VERIFY_WRITE, __p, sizeof(*__p)) ? \
+ __put_user((x), __p) : \
-EFAULT; \
})