Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
[linux-2.6-microblaze.git] / lib / usercopy.c
index 3744b2a..c2bfbca 100644 (file)
@@ -8,7 +8,7 @@ unsigned long _copy_from_user(void *to, const void __user *from, unsigned long n
 {
        unsigned long res = n;
        might_fault();
-       if (likely(access_ok(VERIFY_READ, from, n))) {
+       if (likely(access_ok(from, n))) {
                kasan_check_write(to, n);
                res = raw_copy_from_user(to, from, n);
        }
@@ -23,7 +23,7 @@ EXPORT_SYMBOL(_copy_from_user);
 unsigned long _copy_to_user(void __user *to, const void *from, unsigned long n)
 {
        might_fault();
-       if (likely(access_ok(VERIFY_WRITE, to, n))) {
+       if (likely(access_ok(to, n))) {
                kasan_check_read(from, n);
                n = raw_copy_to_user(to, from, n);
        }