]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: Remove redundant range check from __access_ok_vsyscall()
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 28 Oct 2025 09:15:42 +0000 (10:15 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 6 Nov 2025 12:02:33 +0000 (13:02 +0100)
The only caller __access_ok() is already doing the same check through
__addr_range_nowrap().

Remove the redundant check.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20251028-uml-remove-32bit-pseudo-vdso-v1-7-e930063eff5f@weissschuh.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/include/asm/uaccess.h

index 1c6e0ae41b0c5a7251e5ae81bfc57b21f739cec3..3770bdeee100d8d8bfb84c83f8f98e42b97fc4d0 100644 (file)
@@ -17,8 +17,7 @@
 
 #define __access_ok_vsyscall(addr, size) \
          (((unsigned long) (addr) >= FIXADDR_USER_START) && \
-         ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
-         ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))
+         ((unsigned long) (addr) + (size) <= FIXADDR_USER_END))
 
 #define __addr_range_nowrap(addr, size) \
        ((unsigned long) (addr) <= ((unsigned long) (addr) + (size)))