Home
last modified time | relevance | path

Searched hist:e6cfaf34be9fcd1a8285a294e18986bfc41a409c (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/kernel/
H A Dsysctl.cdiff e6cfaf34be9fcd1a8285a294e18986bfc41a409c Mon Dec 05 13:33:40 CST 2022 Linus Torvalds <torvalds@linux-foundation.org> proc: avoid integer type confusion in get_proc_long

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>