Skip to content

Commit 8e4b720

Browse files
committed
openrisc: fix the fix of copy_from_user()
Since commit acb2505 ("openrisc: fix copy_from_user()"), copy_from_user() returns the number of bytes requested, not the number of bytes not copied. Cc: Al Viro <[email protected]> Fixes: acb2505 ("openrisc: fix copy_from_user()") Signed-off-by: Guenter Roeck <[email protected]>
1 parent 65c0044 commit 8e4b720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/openrisc/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ copy_from_user(void *to, const void *from, unsigned long n)
276276
unsigned long res = n;
277277

278278
if (likely(access_ok(VERIFY_READ, from, n)))
279-
n = __copy_tofrom_user(to, from, n);
279+
res = __copy_tofrom_user(to, from, n);
280280
if (unlikely(res))
281281
memset(to + (n - res), 0, res);
282282
return res;

0 commit comments

Comments
 (0)