perf: Fixup SIGTRAP and sample_flags interaction
The perf_event_attr::sigtrap functionality relies on data->addr being set. However commit7b08463015
("perf: Use sample_flags for addr") changed this to only initialize data->addr when not 0. Fixes:7b08463015
("perf: Use sample_flags for addr") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/Y3426b4OimE%2FI5po%40hirez.programming.kicks-ass.net
This commit is contained in:
parent
eb7081409f
commit
af169b7759
|
@ -9328,6 +9328,9 @@ static int __perf_event_overflow(struct perf_event *event,
|
||||||
*/
|
*/
|
||||||
WARN_ON_ONCE(event->pending_sigtrap != pending_id);
|
WARN_ON_ONCE(event->pending_sigtrap != pending_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event->pending_addr = 0;
|
||||||
|
if (data->sample_flags & PERF_SAMPLE_ADDR)
|
||||||
event->pending_addr = data->addr;
|
event->pending_addr = data->addr;
|
||||||
irq_work_queue(&event->pending_irq);
|
irq_work_queue(&event->pending_irq);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue