summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2017-02-08 14:27:31 +0530
committerSasha Levin <sashal@kernel.org>2020-06-29 20:07:56 -0400
commit190d22176f8d3790533e5aae85b9937df3ac61c0 (patch)
tree8754387fa91856a5d813e5cb2a6a54fbfd164887
parentf637e2c75f9a8bc451ca0e4731c2bd6395e4c365 (diff)
downloadlinux-stable-190d22176f8d3790533e5aae85b9937df3ac61c0.tar.gz
linux-stable-190d22176f8d3790533e5aae85b9937df3ac61c0.tar.bz2
linux-stable-190d22176f8d3790533e5aae85b9937df3ac61c0.zip
powerpc/kprobes: Fixes for kprobe_lookup_name() on BE
[ Upstream commit 30176466e36aadba01e1a630cf42397a3438efa4 ] Fix two issues with kprobes.h on BE which were exposed with the optprobes work: - one, having to do with a missing include for linux/module.h for MODULE_NAME_LEN -- this didn't show up previously since the only users of kprobe_lookup_name were in kprobes.c, which included linux/module.h through other headers, and - two, with a missing const qualifier for a local variable which ends up referring a string literal. Again, this is unique to how kprobe_lookup_name is being invoked in optprobes.c Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/powerpc/include/asm/kprobes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
index 039b583db029..f0717eedf781 100644
--- a/arch/powerpc/include/asm/kprobes.h
+++ b/arch/powerpc/include/asm/kprobes.h
@@ -29,6 +29,7 @@
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/percpu.h>
+#include <linux/module.h>
#include <asm/probes.h>
#include <asm/code-patching.h>
@@ -61,7 +62,7 @@ typedef ppc_opcode_t kprobe_opcode_t;
#define kprobe_lookup_name(name, addr) \
{ \
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
- char *modsym; \
+ const char *modsym; \
bool dot_appended = false; \
if ((modsym = strchr(name, ':')) != NULL) { \
modsym++; \