Skip to content
Commit 7eb09f70 authored by Benjamin Gray's avatar Benjamin Gray Committed by Greg Kroah-Hartman
Browse files

powerpc/watchpoints: Disable preemption in thread_change_pc()



[ Upstream commit cc879ab3 ]

thread_change_pc() uses CPU local data, so must be protected from
swapping CPUs while it is reading the breakpoint struct.

The error is more noticeable after 1e60f356 ("powerpc/watchpoints:
Track perf single step directly on the breakpoint"), which added an
unconditional __this_cpu_read() call in thread_change_pc(). However the
existing __this_cpu_read() that runs if a breakpoint does need to be
re-inserted has the same issue.

Signed-off-by: default avatarBenjamin Gray <bgray@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230829063457.54157-2-bgray@linux.ibm.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 134b01a3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment