Home
last modified time | relevance | path

Searched hist:"01 bb11ad828b320749764fa93ad078db20d08a9e" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/kernel/sched/
H A Dtopology.cdiff 01bb11ad828b320749764fa93ad078db20d08a9e Thu Feb 16 19:39:08 CST 2023 Yury Norov <yury.norov@gmail.com> sched/topology: fix KASAN warning in hop_cmp()

Despite that prev_hop is used conditionally on cur_hop
is not the first hop, it's initialized unconditionally.

Because initialization implies dereferencing, it might happen
that the code dereferences uninitialized memory, which has been
spotted by KASAN. Fix it by reorganizing hop_cmp() logic.

Reported-by: Bruno Goncalves <bgoncalv@redhat.com>
Fixes: cd7f55359c90 ("sched: add sched_numa_find_nth_cpu()")
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Link: https://lore.kernel.org/r/Y+7avK6V9SyAWsXi@yury-laptop/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>