From: Al Viro Date: Tue, 18 Feb 2020 22:30:05 +0000 (-0500) Subject: user_regset_copyout_zero(): use clear_user() X-Git-Tag: v5.8-rc1~57^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5ea75ae6ae60d13dfa35fd5d2e2a81824cba6662;p=users%2Fjedix%2Flinux-maple.git user_regset_copyout_zero(): use clear_user() 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 --- diff --git a/include/linux/regset.h b/include/linux/regset.h index bf02437797384..46d6ae68c4550 100644 --- a/include/linux/regset.h +++ b/include/linux/regset.h @@ -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;