Merge tag 'v4.4.63' into linux-linaro-lsk-v4.4
[firefly-linux-kernel-4.4.55.git] / arch / sparc / include / asm / uaccess_32.h
index e1b6ae3ccdff3482a74ea053551e8dddb7a96dc3..e7d6bb4cd619b362aa8fd84c71ecc3d7a18b9eb3 100644 (file)
@@ -331,8 +331,10 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un
        if (n && __access_ok((unsigned long) from, n)) {
                check_object_size(to, n, false);
                return __copy_user((__force void __user *) to, from, n);
-       } else
+       else {
+               memset(to, 0, n);
                return n;
+       }
 }
 
 static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)