]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/watchpoint: Disable pagefaults when getting user instruction
authorBenjamin Gray <bgray@linux.ibm.com>
Tue, 29 Aug 2023 06:34:56 +0000 (16:34 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 11:18:18 +0000 (13:18 +0200)
commit47a94e87f00c11feb6529594f46d03e341a8224e
tree813f9b53346a52ce996628bb5efbe41ddd4ac816
parent7eb09f70d9c22940ecd2f0399f33c520e2976750
powerpc/watchpoint: Disable pagefaults when getting user instruction

[ Upstream commit 3241f260eb830d27d09cc604690ec24533fdb433 ]

This is called in an atomic context, so is not allowed to sleep if a
user page needs to be faulted in and has nowhere it can be deferred to.
The pagefault_disabled() function is documented as preventing user
access methods from sleeping.

In practice the page will be mapped in nearly always because we are
reading the instruction that just triggered the watchpoint trap.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230829063457.54157-3-bgray@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/hw_breakpoint_constraints.c