Patch "powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-perf-imc-fix-nest-imc-cpuhotplug-callback-failure.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Fri Feb 23 11:45:09 CET 2018
From: Anju T Sudhakar <[email protected]>
Date: Tue, 5 Dec 2017 11:00:38 +0530
Subject: powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure
From: Anju T Sudhakar <[email protected]>
[ Upstream commit ad2b6e01024ef23bddc3ce0bcb115ecd8c520b7e ]
Oops is observed during boot:
Faulting instruction address: 0xc000000000248340
cpu 0x0: Vector: 380 (Data Access Out of Range) at [c000000ff66fb850]
pc: c000000000248340: event_function_call+0x50/0x1f0
lr: c00000000024878c: perf_remove_from_context+0x3c/0x100
sp: c000000ff66fbad0
msr: 9000000000009033
dar: 7d20e2a6f92d03c0
pid = 14, comm = cpuhp/0While registering the cpuhotplug callbacks for nest-imc, if we fail in the cpuhotplug online path for any random node in a multi node system (because the opal call to stop nest-imc counters fails for that node), ppc_nest_imc_cpu_offline() will get invoked for other nodes who successfully returned from cpuhotplug online path.
This call trace is generated since in the ppc_nest_imc_cpu_offline() path we are trying to migrate the event context, when nest-imc counters are not even initialized.
Patch to add a check to ensure that nest-imc is registered before migrating the event context.
--- arch/powerpc/perf/imc-pmu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/powerpc/perf/imc-pmu.c +13 -0
@@ -309,6 +309,19 @@ static int ppc_nest_imc_cpu_offline(unsireturn 0 ;/* +* Check whether nest_imc is registered. We could end up here if the +* cpuhotplug callback registration fails. i.e, callback invokes the +* offline path for all successfully registered nodes. At this stage, +* nest_imc pmu will not be registered and we should return here. +* +* We return with a zero since this is not an offline failure. And +* cpuhp_setup_state() returns the actual failure reason to the caller, +* which in turn will call the cleanup routine. +*/ +if (!nest_pmus) +return 0 ; + +/* * Now that this cpu is one of the designated, * find a next cpu a) which is online and b) in same chip. */
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/powerpc-perf-imc-fix-nest-imc-cpuhotplug-callback-failure.patch