]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix kexec crashes caused by tlbie tracing
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Wed, 22 Nov 2017 17:32:07 +0000 (23:02 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Nov 2017 12:10:14 +0000 (23:10 +1100)
commitdb5aafad8c5fbc9e47c211ea5b6a7e817e098e0b
treeb41f24ddf8cffa0b0a4f7fdd78d8f3bacc959ae5
parentc088dc85e392e401d070f82ed2c261d83f5cab7d
powerpc/powernv: Fix kexec crashes caused by tlbie tracing

Rebooting into a new kernel with kexec fails in trace_tlbie() which is
called from native_hpte_clear(). This happens if the running kernel
has CONFIG_LOCKDEP enabled. With lockdep enabled, the tracepoints
always execute few RCU checks regardless of whether tracing is on or
off. We are already in the last phase of kexec sequence in real mode
with HILE_BE set. At this point the RCU check ends up in
RCU_LOCKDEP_WARN and causes kexec to fail.

Fix this by not calling trace_tlbie() from native_hpte_clear().

mpe: It's not safe to call trace points at this point in the kexec
path, even if we could avoid the RCU checks/warnings. The only
solution is to not call them.

Fixes: 614eaa92a92d ("powerpc/mm: Trace tlbie(l) instructions")
Cc: stable@vger.kernel.org # v4.13+
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/hash_native_64.c