ovl: force read-only sb on failure to create index dir
[linux-2.6-microblaze.git] / lib / usercopy.c
index ca2a697..b26509f 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
-#include <linux/uaccess.h>
 #include <linux/bitops.h>
+#include <linux/instrumented.h>
+#include <linux/uaccess.h>
 
 /* out-of-line parts */
 
@@ -10,7 +11,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(from, n))) {
-               kasan_check_write(to, n);
+               instrument_copy_from_user(to, from, n);
                res = raw_copy_from_user(to, from, n);
        }
        if (unlikely(res))
@@ -25,7 +26,7 @@ unsigned long _copy_to_user(void __user *to, const void *from, unsigned long n)
 {
        might_fault();
        if (likely(access_ok(to, n))) {
-               kasan_check_read(from, n);
+               instrument_copy_to_user(to, from, n);
                n = raw_copy_to_user(to, from, n);
        }
        return n;