perf: Fix software event overflow
The below patch is for -stable only, upstream has a much larger patch
that contains the below hunk in commit a8b0ca17b8
Vince found that under certain circumstances software event overflows
go wrong and deadlock. Avoid trying to delete a timer from the timer
callback.
Reported-by: Vince Weaver <vweaver1@eecs.utk.edu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
6e243f86d1
commit
462fee3af7
1 changed files with 2 additions and 5 deletions
|
|
@ -5016,11 +5016,8 @@ static int __perf_event_overflow(struct perf_event *event, int nmi,
|
|||
if (events && atomic_dec_and_test(&event->event_limit)) {
|
||||
ret = 1;
|
||||
event->pending_kill = POLL_HUP;
|
||||
if (nmi) {
|
||||
event->pending_disable = 1;
|
||||
irq_work_queue(&event->pending);
|
||||
} else
|
||||
perf_event_disable(event);
|
||||
event->pending_disable = 1;
|
||||
irq_work_queue(&event->pending);
|
||||
}
|
||||
|
||||
if (event->overflow_handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue