Skip to content

Commit

Permalink
user_regset_copyout_zero(): use clear_user()
Browse files Browse the repository at this point in the history
that's the only caller of __clear_user() in generic code, and it's
not hot enough to bother with skipping access_ok().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jun 3, 2020
1 parent 86977da commit 5ea75ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/regset.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static inline int user_regset_copyout_zero(unsigned int *pos,
if (*kbuf) {
memset(*kbuf, 0, copy);
*kbuf += copy;
} else if (__clear_user(*ubuf, copy))
} else if (clear_user(*ubuf, copy))
return -EFAULT;
else
*ubuf += copy;
Expand Down

0 comments on commit 5ea75ae

Please sign in to comment.