UPSTREAM: coresight: perf: Fix per cpu path management
We create a coresight trace path for each online CPU when we start the event. We rely on the number of online CPUs and then go on to allocate an array matching the "number of online CPUs" for holding the path and then uses normal CPU id as the index to the array. This is problematic as we could have some offline CPUs causing us to access beyond the actual array size (e.g, on a dual SMP system, if CPU0 is offline, CPU1 could be really accessing beyond the array). The solution is to switch to per-cpu array for holding the path. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by:Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by:
Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (Upstream commit 5ecabe4a76e8cdb61fa3e24862d9ca240a1c4ddf). Bug: 140266694 Change-Id: Iefbd55ef00149165558749af67dcef5756be2046 Signed-off-by:
Yabin Cui <yabinc@google.com>
Loading
Please register or sign in to comment