summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2023-02-17 04:39:08 +0300
committerJakub Kicinski <kuba@kernel.org>2023-02-20 22:45:33 +0300
commit01bb11ad828b320749764fa93ad078db20d08a9e (patch)
tree7c85bb1f6473ba62607a6a37b1d75f1660d6620a /net
parent3fcdf2dfefb6313ea0395519d1784808c0b6559b (diff)
downloadlinux-01bb11ad828b320749764fa93ad078db20d08a9e.tar.xz
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>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions