diff options
| author | Keith Busch <kbusch@kernel.org> | 2025-09-12 21:55:13 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-02 14:35:36 +0300 |
| commit | 90b0b0bd012ae2b10ee42ba8738cc838c6d43695 (patch) | |
| tree | 8f61643e191de4758176109715b3ed783c5a7535 /include/linux | |
| parent | 05366527f44cf4b884f3d9462ae8009be9665856 (diff) | |
| download | linux-90b0b0bd012ae2b10ee42ba8738cc838c6d43695.tar.xz | |
overflow: Correct check_shl_overflow() comment
[ Upstream commit 4578be130a6470d85ff05b13b75a00e6224eeeeb ]
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>
Signed-off-by: Eliav Farber <farbere@amazon.com>
Fixes: 0c66847793d1 ("overflow.h: Add arithmetic shift helper")
Link: https://lore.kernel.org/r/20210401160629.1941787-1-kbusch@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/overflow.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 35af574d006f..d1dd039fe1c3 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; \ |
