OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a38fd87
)
overflow: Correct check_shl_overflow() comment
author
Keith Busch
<kbusch@kernel.org>
Thu, 1 Apr 2021 16:06:29 +0000
(09:06 -0700)
committer
Kees Cook
<keescook@chromium.org>
Thu, 1 Apr 2021 21:07:41 +0000
(14:07 -0700)
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
include/linux/overflow.h
patch
|
blob
|
history
diff --git
a/include/linux/overflow.h
b/include/linux/overflow.h
index
ef74051
..
0f12345
100644
(file)
--- 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
fals
e is returned.
+ * considered "safe for use" if
tru
e is returned.
*/
#define check_shl_overflow(a, s, d) __must_check_overflow(({ \
typeof(a) _a = a; \