mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
perf: Fix addr_filter_ranges lifetime
Lee Jia Jie reported that since event::addr_filter_ranges is used under RCU, it should be RCU freed. Reported-by: Lee Jia Jie <jiajie.lee@starlabs.sg> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
This commit is contained in:
parent
8cd9520d35
commit
e62d4192e5
|
|
@ -5303,6 +5303,7 @@ static void free_event_rcu(struct rcu_head *head)
|
|||
if (event->ns)
|
||||
put_pid_ns(event->ns);
|
||||
perf_event_free_filter(event);
|
||||
kfree(event->addr_filter_ranges);
|
||||
kmem_cache_free(perf_event_cache, event);
|
||||
}
|
||||
|
||||
|
|
@ -5750,8 +5751,6 @@ static void __free_event(struct perf_event *event)
|
|||
if (event->attach_state & PERF_ATTACH_CALLCHAIN)
|
||||
put_callchain_buffers();
|
||||
|
||||
kfree(event->addr_filter_ranges);
|
||||
|
||||
if (event->attach_state & PERF_ATTACH_EXCLUSIVE)
|
||||
exclusive_event_destroy(event);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user