vserver 1.9.5.x5
[linux-2.6.git] / arch / um / kernel / skas / include / uaccess-skas.h
index da9c52c..11986c9 100644 (file)
@@ -7,11 +7,16 @@
 #define __SKAS_UACCESS_H
 
 #include "asm/errno.h"
+#include "asm/fixmap.h"
 
 #define access_ok_skas(type, addr, size) \
        ((segment_eq(get_fs(), KERNEL_DS)) || \
         (((unsigned long) (addr) < TASK_SIZE) && \
-         ((unsigned long) (addr) + (size) <= TASK_SIZE)))
+         ((unsigned long) (addr) + (size) <= TASK_SIZE)) || \
+        ((type == VERIFY_READ ) && \
+         ((unsigned long) (addr) >= FIXADDR_USER_START) && \
+         ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
+         ((unsigned long) (addr) + (size) >= (unsigned long)(addr))))
 
 static inline int verify_area_skas(int type, const void * addr,
                                   unsigned long size)