diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-01 22:56:13 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-01 22:56:13 +0300 |
commit | d7b48fec3520da075a4093d3aa37ce4daff7510b (patch) | |
tree | e67cf00d4c3712e41b2e97e45507de0467b5c44d /arch/x86/kernel/kprobes/opt.c | |
parent | 2ea51b884b07ac7fbb49eb91860eb05c13161ad2 (diff) | |
parent | 021f5f12f2ab44874193c68fb19eea154493f83a (diff) | |
download | linux-d7b48fec3520da075a4093d3aa37ce4daff7510b.tar.xz |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"Two kprobes fixes and a handful of tooling fixes"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf tools: Make sparc64 arch point to sparc
perf symbols: Define EM_AARCH64 for older OSes
perf top: Fix SIGBUS on sparc64
perf tools: Fix probing for PERF_FLAG_FD_CLOEXEC flag
perf tools: Fix pthread_attr_setaffinity_np build error
perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np feature check
perf bench: Fix order of arguments to memcpy_alloc_mem
kprobes/x86: Check for invalid ftrace location in __recover_probed_insn()
kprobes/x86: Use 5-byte NOP when the code might be modified by ftrace
Diffstat (limited to 'arch/x86/kernel/kprobes/opt.c')
-rw-r--r-- | arch/x86/kernel/kprobes/opt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c index 0dd8d089c315..7b3b9d15c47a 100644 --- a/arch/x86/kernel/kprobes/opt.c +++ b/arch/x86/kernel/kprobes/opt.c @@ -259,6 +259,8 @@ static int can_optimize(unsigned long paddr) */ return 0; recovered_insn = recover_probed_instruction(buf, addr); + if (!recovered_insn) + return 0; kernel_insn_init(&insn, (void *)recovered_insn, MAX_INSN_SIZE); insn_get_length(&insn); /* Another subsystem puts a breakpoint */ |