Skip to content

Commit

Permalink
kprobe/ftrace: fix build error due to bad function definition
Browse files Browse the repository at this point in the history
Commit 1a7d089 ("kprobe/ftrace: bail out if ftrace was killed")
introduced a bad K&R function definition, which we haven't accepted in a
long long time.

Gcc seems to let it slide, but clang notices with the appropriate error:

  kernel/kprobes.c:1140:24: error: a function declaration without a prototype is deprecated in all >
   1140 | void kprobe_ftrace_kill()
        |                        ^
        |                         void

but this commit was apparently never in linux-next before it was sent
upstream, so it didn't get the appropriate build test coverage.

Fixes: 1a7d089 kprobe/ftrace: bail out if ftrace was killed
Cc: Stephen Brennan <[email protected]>
Cc: Masami Hiramatsu (Google) <[email protected]>
Cc: Guo Ren <[email protected]>
Cc: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed May 18, 2024
1 parent f08a1e9 commit 4b377b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ static int disarm_kprobe_ftrace(struct kprobe *p)
ipmodify ? &kprobe_ipmodify_enabled : &kprobe_ftrace_enabled);
}

void kprobe_ftrace_kill()
void kprobe_ftrace_kill(void)
{
kprobe_ftrace_disabled = true;
}
Expand Down

0 comments on commit 4b377b4

Please sign in to comment.