mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
overflow: Correct check_shl_overflow() comment
commit 4578be130a6470d85ff05b13b75a00e6224eeeeb upstream.
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: 0c66847793 ("overflow.h: Add arithmetic shift helper")
Link: https://lore.kernel.org/r/20210401160629.1941787-1-kbusch@kernel.org
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dbf89a4db3
commit
0f6dd56712
1 changed files with 1 additions and 1 deletions
|
|
@ -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; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue