]> git.baikalelectronics.ru Git - kernel.git/commit
uaccess: add missing __must_check attributes
authorKees Cook <keescook@chromium.org>
Wed, 25 Sep 2019 23:47:39 +0000 (16:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 26 Sep 2019 00:51:40 +0000 (17:51 -0700)
commitf4480829101616ff62d15942b70ebe2fadffc611
tree3dbec1875f99adf45fbf236dcfa53efd1497e8cb
parent61df7a9945bbfd2d1a4ef0061dcd49cbc66f9975
uaccess: add missing __must_check attributes

The usercopy implementation comments describe that callers of the
copy_*_user() family of functions must always have their return values
checked.  This can be enforced at compile time with __must_check, so add
it where needed.

Link: http://lkml.kernel.org/r/201908251609.ADAD5CAAC1@keescook
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/thread_info.h
include/linux/uaccess.h