We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 917400c commit 8f03598Copy full SHA for 8f03598
arch/blackfin/include/asm/uaccess.h
@@ -171,11 +171,12 @@ static inline int bad_user_access_length(void)
171
static inline unsigned long __must_check
172
copy_from_user(void *to, const void __user *from, unsigned long n)
173
{
174
- if (access_ok(VERIFY_READ, from, n))
+ if (likely(access_ok(VERIFY_READ, from, n))) {
175
memcpy(to, (const void __force *)from, n);
176
- else
177
- return n;
178
- return 0;
+ return 0;
+ }
+ memset(to, 0, n);
179
+ return n;
180
}
181
182
0 commit comments