mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
tracing/filters: Fix MATCH_FRONT_ONLY filter matching
MATCH_FRONT_ONLY actually is a full matching: # ./perf record -R -f -a -e lock:lock_acquire \ --filter 'name ~rcu_*' sleep 1 # ./perf trace (no output) We should pass the length of the pattern string to strncmp(). Signed-off-by: Li Zefan <[email protected]> LKML-Reference: <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
This commit is contained in:
1 parent
751e9983ee
commit
285caad415
1 file changed
+1
-1
@@ -261,7 +261,7 @@ static int regex_match_full(char *str, struct regex *r, int len)
|
||||
|
||||
static int regex_match_front(char *str, struct regex *r, int len)
|
||||
{
|
||||
if (strncmp(str, r->pattern, len) == 0)
|
||||
if (strncmp(str, r->pattern, r->len) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user