Re: [PATCH 3/9] sched: add sched_numa_find_nth_cpu()
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-02-17 11:13:39
Also in:
linux-crypto, linux-rdma, lkml
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-02-17 11:13:39
Also in:
linux-crypto, linux-rdma, lkml
On Thu, Feb 16, 2023 at 05:39:08PM -0800, Yury Norov wrote:
From: Yury Norov <yury.norov@gmail.com> Date: Thu, 16 Feb 2023 17:03:30 -0800 Subject: [PATCH] sched/topology: fix KASAN warning in hop_cmp() Despite that prev_hop is used conditionally on curr_hop is not the
curr --> cur
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.
Nice catch! I guess it deserves for a comment inside the code (IIRC I was puzzled of the logic behind and it was changed due to lack of this knowledge.) -- With Best Regards, Andy Shevchenko