https://github.com/torvalds/linux
Revision e6cfaf34be9fcd1a8285a294e18986bfc41a409c authored by Linus Torvalds on 05 December 2022, 19:33:40 UTC, committed by Linus Torvalds on 05 December 2022, 19:33:40 UTC
proc_get_long() is passed a size_t, but then assigns it to an 'int'
variable for the length.  Let's not do that, even if our IO paths are
limited to MAX_RW_COUNT (exactly because of these kinds of type errors).

So do the proper test in the rigth type.

Reported-by: Kyle Zeng <zengyhkyle@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b52be55
History
Tip revision: e6cfaf34be9fcd1a8285a294e18986bfc41a409c authored by Linus Torvalds on 05 December 2022, 19:33:40 UTC
proc: avoid integer type confusion in get_proc_long
Tip revision: e6cfaf3
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 19.9 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 151 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 2.0 KB
.mailmap -rw-r--r-- 24.4 KB
.rustfmt.toml -rw-r--r-- 369 bytes
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 99.3 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 672.3 KB
Makefile -rw-r--r-- 69.0 KB
README -rw-r--r-- 727 bytes

README

back to top