summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/kprobes.c
diff options
context:
space:
mode:
authorLinus Torvalds2019-07-18 21:23:45 +0200
committerLinus Torvalds2019-07-18 21:23:45 +0200
commit0e2a5b5bd9a6aaec85df347dd71432a1d2d10763 (patch)
tree31a1289a9c73c559cf848a2ea2528c3079b058f4 /arch/parisc/kernel/kprobes.c
parentMerge tag 'modules-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentparisc: Wire up clone3 syscall (diff)
downloadkernel-qcow2-linux-0e2a5b5bd9a6aaec85df347dd71432a1d2d10763.tar.gz
kernel-qcow2-linux-0e2a5b5bd9a6aaec85df347dd71432a1d2d10763.tar.xz
kernel-qcow2-linux-0e2a5b5bd9a6aaec85df347dd71432a1d2d10763.zip
Merge branch 'parisc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller: - Prevent kernel panics by adding proper checking of register values injected via the ptrace interface - Wire up the new clone3 syscall * 'parisc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Wire up clone3 syscall parisc: Avoid kernel panic triggered by invalid kprobe parisc: Ensure userspace privilege for ptraced processes in regset functions parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1
Diffstat (limited to 'arch/parisc/kernel/kprobes.c')
-rw-r--r--arch/parisc/kernel/kprobes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c
index d58960b33bda..5d7f2692ac5a 100644
--- a/arch/parisc/kernel/kprobes.c
+++ b/arch/parisc/kernel/kprobes.c
@@ -133,6 +133,9 @@ int __kprobes parisc_kprobe_ss_handler(struct pt_regs *regs)
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
struct kprobe *p = kprobe_running();
+ if (!p)
+ return 0;
+
if (regs->iaoq[0] != (unsigned long)p->ainsn.insn+4)
return 0;