diff options
Diffstat (limited to 'arch/sparc/kernel/kprobes.c')
-rw-r--r-- | arch/sparc/kernel/kprobes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c index 3bc6527c95af..a39d1ba5a119 100644 --- a/arch/sparc/kernel/kprobes.c +++ b/arch/sparc/kernel/kprobes.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/kprobes.h> | 7 | #include <linux/kprobes.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/kdebug.h> | 9 | #include <linux/kdebug.h> |
10 | #include <linux/slab.h> | ||
10 | #include <asm/signal.h> | 11 | #include <asm/signal.h> |
11 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
@@ -46,6 +47,9 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}}; | |||
46 | 47 | ||
47 | int __kprobes arch_prepare_kprobe(struct kprobe *p) | 48 | int __kprobes arch_prepare_kprobe(struct kprobe *p) |
48 | { | 49 | { |
50 | if ((unsigned long) p->addr & 0x3UL) | ||
51 | return -EILSEQ; | ||
52 | |||
49 | p->ainsn.insn[0] = *p->addr; | 53 | p->ainsn.insn[0] = *p->addr; |
50 | flushi(&p->ainsn.insn[0]); | 54 | flushi(&p->ainsn.insn[0]); |
51 | 55 | ||