direct-io.hg

changeset 13633:057c4c2991fa

32-on-64: Fix an one-off error in compat_addr_ok().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@localhost.localdomain
date Fri Jan 26 13:36:52 2007 +0000 (2007-01-26)
parents fcaf34bc5e41
children 5d440c35a784
files xen/include/asm-x86/x86_64/uaccess.h
line diff
     1.1 --- a/xen/include/asm-x86/x86_64/uaccess.h	Fri Jan 26 13:34:02 2007 +0000
     1.2 +++ b/xen/include/asm-x86/x86_64/uaccess.h	Fri Jan 26 13:36:52 2007 +0000
     1.3 @@ -20,7 +20,8 @@
     1.4  #define __compat_addr_ok(addr) \
     1.5      ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(current->domain))
     1.6  
     1.7 -#define compat_access_ok(addr, size) __compat_addr_ok((addr) + (size))
     1.8 +#define compat_access_ok(addr, size) \
     1.9 +    __compat_addr_ok((unsigned long)(addr) + ((size) ? (size) - 1 : 0))
    1.10  
    1.11  #define compat_array_access_ok(addr,count,size) \
    1.12      (likely((count) < (~0U / (size))) && \