diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2022-01-31 09:24:51 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-02-02 13:11:42 +0100 |
commit | d680ff24e9e14444c63945b43a37ede7cd6958f9 (patch) | |
tree | 0033b42173266bf4fb1e3e372794b00dce78d8ab /kernel/events | |
parent | 1fb85d06ad6754796cd1b920639ca9d8840abefd (diff) |
perf/core: Fix address filter parser for multiple filters
Reset appropriate variables in the parser loop between parsing separate
filters, so that they do not interfere with parsing the next filter.
Fixes: 375637bc524952 ("perf/core: Introduce address range filtering")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220131072453.2839535-4-adrian.hunter@intel.com
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 76c754e45d01..2889b82fb75e 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10558,8 +10558,11 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr, } /* ready to consume more filters */ + kfree(filename); + filename = NULL; state = IF_STATE_ACTION; filter = NULL; + kernel = 0; } } |