summaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2021-04-01 19:06:29 +0300
committerKees Cook <keescook@chromium.org>2021-04-02 00:07:41 +0300
commit4578be130a6470d85ff05b13b75a00e6224eeeeb (patch)
tree3fff5a3d13dbfb53cc8b855a7a5927e139ec29ec /include/linux/overflow.h
parenta38fd8748464831584a19438cbb3082b5a2dab15 (diff)
downloadlinux-4578be130a6470d85ff05b13b75a00e6224eeeeb.tar.xz
overflow: Correct check_shl_overflow() comment
A 'false' return means the value was safely set, so the comment should say 'true' for when it is not considered safe. Cc: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Fixes: 0c66847793d1 ("overflow.h: Add arithmetic shift helper") Link: https://lore.kernel.org/r/20210401160629.1941787-1-kbusch@kernel.org
Diffstat (limited to 'include/linux/overflow.h')
-rw-r--r--include/linux/overflow.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/overflow.h b/include/linux/overflow.h
index ef74051d5cfe..0f12345c21fb 100644
--- a/include/linux/overflow.h
+++ b/include/linux/overflow.h
@@ -235,7 +235,7 @@ static inline bool __must_check __must_check_overflow(bool overflow)
* - 'a << s' sets the sign bit, if any, in '*d'.
*
* '*d' will hold the results of the attempted shift, but is not
- * considered "safe for use" if false is returned.
+ * considered "safe for use" if true is returned.
*/
#define check_shl_overflow(a, s, d) __must_check_overflow(({ \
typeof(a) _a = a; \