diff options
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/uaccess.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h index 32420824375b..30c9baffa96f 100644 --- a/arch/arc/include/asm/uaccess.h +++ b/arch/arc/include/asm/uaccess.h | |||
@@ -43,7 +43,7 @@ | |||
43 | * Because it essentially checks if buffer end is within limit and @len is | 43 | * Because it essentially checks if buffer end is within limit and @len is |
44 | * non-ngeative, which implies that buffer start will be within limit too. | 44 | * non-ngeative, which implies that buffer start will be within limit too. |
45 | * | 45 | * |
46 | * The reason for rewriting being, for majorit yof cases, @len is generally | 46 | * The reason for rewriting being, for majority of cases, @len is generally |
47 | * compile time constant, causing first sub-expression to be compile time | 47 | * compile time constant, causing first sub-expression to be compile time |
48 | * subsumed. | 48 | * subsumed. |
49 | * | 49 | * |
@@ -53,7 +53,7 @@ | |||
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | #define __user_ok(addr, sz) (((sz) <= TASK_SIZE) && \ | 55 | #define __user_ok(addr, sz) (((sz) <= TASK_SIZE) && \ |
56 | (((addr)+(sz)) <= get_fs())) | 56 | ((addr) <= (get_fs() - (sz)))) |
57 | #define __access_ok(addr, sz) (unlikely(__kernel_ok) || \ | 57 | #define __access_ok(addr, sz) (unlikely(__kernel_ok) || \ |
58 | likely(__user_ok((addr), (sz)))) | 58 | likely(__user_ok((addr), (sz)))) |
59 | 59 | ||