Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: Remove redundant range check from __access_ok_vsyscall()

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>

authored by

Thomas Weißschuh and committed by
Johannes Berg
880f615b 78fdfc9f

+1 -2
+1 -2
arch/um/include/asm/uaccess.h
··· 17 17 18 18 #define __access_ok_vsyscall(addr, size) \ 19 19 (((unsigned long) (addr) >= FIXADDR_USER_START) && \ 20 - ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \ 21 - ((unsigned long) (addr) + (size) >= (unsigned long)(addr))) 20 + ((unsigned long) (addr) + (size) <= FIXADDR_USER_END)) 22 21 23 22 #define __addr_range_nowrap(addr, size) \ 24 23 ((unsigned long) (addr) <= ((unsigned long) (addr) + (size)))