--- 2.6/include/asm-i386/uaccess.h 2005-03-12 01:05:49.000000000 +0100 +++ build-2.6/include/asm-i386/uaccess.h 2005-03-12 17:37:27.938115959 +0100 @@ -217,6 +217,8 @@ * * Returns zero on success, or -EFAULT on error. */ +#ifdef CONFIG_X86_WP_WORKS_OK + #define put_user(x,ptr) \ ({ int __ret_pu; \ __chk_user_ptr(ptr); \ @@ -230,6 +232,21 @@ __ret_pu; \ }) +#else +#define put_user(x,ptr) \ +({ \ + int __ret_pu; \ + __typeof__(*(ptr)) __pus_tmp = x; \ + __ret_pu=0; \ + if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, \ + sizeof(*(ptr))) != 0)) \ + __ret_pu=-EFAULT; \ + __ret_pu; \ + }) + + +#endif + /** * __get_user: - Get a simple variable from user space, with less checking. * @x: Variable to store result.