Skip to content

Commit bdd3b05

Browse files
swanlirostedt
authored andcommitted
tracing: Check absolute path of input file in recordmcount.pl
The ftrace.c file may reference the mcount function and this may interfere with the recordmcount.pl processing. To avoid this, the code does not process the kernel/trace/ftrace.o. But currently the check is against a relative path. This patch modifies the check to succeed if the path is an absolute path. Signed-off-by: Li Hong <lihong.hi@gmail.com> LKML-Reference: <20091028050332.GC30758@uhli> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent e2d753f commit bdd3b05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/recordmcount.pl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
$ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
124124

125125
# This file refers to mcount and shouldn't be ftraced, so lets' ignore it
126-
if ($inputfile eq "kernel/trace/ftrace.o") {
126+
if ($inputfile =~ m,kernel/trace/ftrace\.o$,) {
127127
exit(0);
128128
}
129129

0 commit comments

Comments
 (0)