summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJianyun Gao <jianyungao89@gmail.com>2026-07-20 17:46:48 +0800
committerMikulas Patocka <mpatocka@redhat.com>2026-07-20 15:35:35 +0200
commitfb9e17287a4ea1cbbcedc77e6866978ecc2a7b55 (patch)
tree488105447cf0b5ec848f7961d4a0a5e185a9aeae /tools/perf/scripts/python/bin
parent73c37fe54cd056d07461b142ab0b8b81e1ef6ad8 (diff)
dm-pcache: fix implicit u8 truncation of gc_percent in message handler
When setting gc_percent via message, kstrtoul parses the input into an unsigned long, which is then implicitly truncated to u8 when passed to pcache_cache_set_gc_percent(). For example, value 266 (0x10A) silently truncates to 10 (0x0A), successfully bypassing the > 90 upper bound check in pcache_cache_set_gc_percent(), and setting a different value than the user intended. Use kstrtou8 directly instead of kstrtoul, so that overflow values are properly rejected. Cc: stable@vger.kernel.org Fixes: 1d57628ff95b ("dm-pcache: add persistent cache target in device-mapper") Signed-off-by: Jianyun Gao <jianyungao89@gmail.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions