summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2026-05-10 21:37:00 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-03 01:22:14 +0300
commit62b21c6f1d88c66a200c2c54b704e503e2e5a60f (patch)
tree939ec34e5a5b579ad25c6a12422cea0a58649ba4 /include/linux/timerqueue.h
parenta9920428f19481d1227992ecbf1c73efd5b93001 (diff)
downloadlinux-62b21c6f1d88c66a200c2c54b704e503e2e5a60f.tar.xz
mm/shrinker: avoid out-of-bounds read in set_shrinker_bit()
set_shrinker_bit() reads info->unit[shrinker_id_to_index(shrinker_id)] before checking shrinker_id against info->map_nr_max, so an id past the currently visible map_nr_max reads past the unit[] array before the WARN_ON_ONCE() catches it. Determined from code inspection. Move the load into the bounded branch. Link: https://lore.kernel.org/20260510183700.102475-1-devnexen@gmail.com Fixes: 307bececcd12 ("mm: shrinker: add a secondary array for shrinker_info::{map, nr_deferred}") Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Qi Zheng <qi.zheng@linux.dev> Acked-by: Muchun Song <muchun.song@linux.dev> Cc: Dave Chinner <david@fromorbit.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions