mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
ARM: uaccess: add further explanation of __range_ok()
Detail the success return condition, and that we rely on KERNEL_DS being zero for this to operate correctly. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
@@ -78,7 +78,11 @@ static inline void set_fs(mm_segment_t fs)
|
||||
|
||||
#define segment_eq(a, b) ((a) == (b))
|
||||
|
||||
/* We use 33-bit arithmetic here... */
|
||||
/*
|
||||
* We use 33-bit arithmetic here. Success returns zero, failure returns
|
||||
* addr_limit. We take advantage that addr_limit will be zero for KERNEL_DS,
|
||||
* so this will always return success in that case.
|
||||
*/
|
||||
#define __range_ok(addr, size) ({ \
|
||||
unsigned long flag, roksum; \
|
||||
__chk_user_ptr(addr); \
|
||||
|
Reference in New Issue
Block a user