summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/hw_breakpoint_constraints.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2023-10-07 11:32:24 +0200
committerIngo Molnar <mingo@kernel.org>2023-10-07 11:32:24 +0200
commit8db30574db25fa20cdcfa03e374edc3f8b8dc301 (patch)
tree0b54686593694b68fb0537197eaa4bec7a44985d /arch/powerpc/kernel/hw_breakpoint_constraints.c
parentd4d6596b43868a1e05fe5b047e73c3aff96444c6 (diff)
parent9e0bc36ab07c550d791bf17feeb479f1dfc42d89 (diff)
downloadlinux-8db30574db25fa20cdcfa03e374edc3f8b8dc301.tar.gz
linux-8db30574db25fa20cdcfa03e374edc3f8b8dc301.tar.bz2
linux-8db30574db25fa20cdcfa03e374edc3f8b8dc301.zip
Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/powerpc/kernel/hw_breakpoint_constraints.c')
-rw-r--r--arch/powerpc/kernel/hw_breakpoint_constraints.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/hw_breakpoint_constraints.c b/arch/powerpc/kernel/hw_breakpoint_constraints.c
index a74623025f3a..9e51801c4915 100644
--- a/arch/powerpc/kernel/hw_breakpoint_constraints.c
+++ b/arch/powerpc/kernel/hw_breakpoint_constraints.c
@@ -131,8 +131,13 @@ void wp_get_instr_detail(struct pt_regs *regs, ppc_inst_t *instr,
int *type, int *size, unsigned long *ea)
{
struct instruction_op op;
+ int err;
- if (__get_user_instr(*instr, (void __user *)regs->nip))
+ pagefault_disable();
+ err = __get_user_instr(*instr, (void __user *)regs->nip);
+ pagefault_enable();
+
+ if (err)
return;
analyse_instr(&op, regs, *instr);