another 32-on-64 bugfix
PATCH 1/1 another 32-on-64 bugfix
Fix a one-off error in compat_addr_ok().
Signed-off-by Jan Beulich <[email protected]>
xen/include/asm-x86/x86_64/uaccess.h +2 -1
@@ -20,7 +20,8 @@#define __compat_addr_ok (addr) \ ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(current->domain)) -#define compat_access_ok (addr, size) __compat_addr_ok((addr) + (size)) +#define compat_access_ok (addr, size) \ + __compat_addr_ok((unsigned long)(addr) + ((size) ? (size) - 1 : 0))#define compat_array_access_ok (addr,count,size) \ (likely((count) < (~0U / (size))) && \