aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-07-28 09:23:37 -0400
committerMichal Simek <monstr@monstr.eu>2011-10-14 06:24:27 -0400
commit41b7602ed17a6bbb3b3d33087c39ef5c3a5589c7 (patch)
treeb19f00fed217236240de03937741047e51a54016 /arch/microblaze
parentebe211254bfa6295f4ab0b33c7c881bdfabbab60 (diff)
microblaze: Fix access_ok macro
There is the problem with bit OR (|) because for some combination is addr | size | addr+size equal to seq. For standard kernel setting (kernel starts at 0xC0000000) is seq for user space 0xBFFFFFFF and everything below this limit is fine. But even address 0xBFFFFFFF is fine because it is below kernel space. Signed-off-by: Andrew Fedonczuk <andrew.fedonczuk@ericsson.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/include/asm/uaccess.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 5bb95a11880d..072b0077abf9 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -95,7 +95,7 @@ static inline int ___range_ok(unsigned long addr, unsigned long size)
95 * - "addr", "addr + size" and "size" are all below the limit 95 * - "addr", "addr + size" and "size" are all below the limit
96 */ 96 */
97#define access_ok(type, addr, size) \ 97#define access_ok(type, addr, size) \
98 (get_fs().seg > (((unsigned long)(addr)) | \ 98 (get_fs().seg >= (((unsigned long)(addr)) | \
99 (size) | ((unsigned long)(addr) + (size)))) 99 (size) | ((unsigned long)(addr) + (size))))
100 100
101/* || printk("access_ok failed for %s at 0x%08lx (size %d), seg 0x%08x\n", 101/* || printk("access_ok failed for %s at 0x%08lx (size %d), seg 0x%08x\n",