Skip to content

Commit a07f99a

Browse files
rnavSasha Levin
authored andcommitted
powerpc/kprobes: Fixes for kprobe_lookup_name() on BE
[ Upstream commit 3017646 ] 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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 354fb59 commit a07f99a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/powerpc/include/asm/kprobes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/types.h>
3030
#include <linux/ptrace.h>
3131
#include <linux/percpu.h>
32+
#include <linux/module.h>
3233
#include <asm/probes.h>
3334
#include <asm/code-patching.h>
3435

@@ -60,7 +61,7 @@ typedef ppc_opcode_t kprobe_opcode_t;
6061
#define kprobe_lookup_name(name, addr) \
6162
{ \
6263
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
63-
char *modsym; \
64+
const char *modsym; \
6465
bool dot_appended = false; \
6566
if ((modsym = strchr(name, ':')) != NULL) { \
6667
modsym++; \

0 commit comments

Comments
 (0)