From: Li Hong Date: Wed, 28 Oct 2009 05:03:32 +0000 (+0800) Subject: tracing: Check absolute path of input file in recordmcount.pl X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=bdd3b052c63b2c19a0118937f500985c01a19956;p=deliverable%2Flinux.git 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 LKML-Reference: <20091028050332.GC30758@uhli> Signed-off-by: Steven Rostedt --- diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index a512af1514bd..b80e5d04416b 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -123,7 +123,7 @@ my ($arch, $bits, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV; # This file refers to mcount and shouldn't be ftraced, so lets' ignore it -if ($inputfile eq "kernel/trace/ftrace.o") { +if ($inputfile =~ m,kernel/trace/ftrace\.o$,) { exit(0); }