Skip to content

Commit 55b2662

Browse files
committed
openrisc: uaccess: Add user address space check to access_ok
Now that __user annotations are fixed for openrisc uaccess api's we can add checking to the access_ok macro. This patch adds the __chk_user_ptr check, on normal builds the added check is a nop. Signed-off-by: Stafford Horne <shorne@gmail.com> Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
1 parent d995966 commit 55b2662

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/openrisc/include/asm/uaccess.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ static inline int __range_ok(unsigned long addr, unsigned long size)
5757

5858
#define access_ok(addr, size) \
5959
({ \
60+
__chk_user_ptr(addr); \
6061
__range_ok((unsigned long)(addr), (size)); \
6162
})
6263

0 commit comments

Comments
 (0)