aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-07-28 20:47:10 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-04 21:58:35 -0700
commit462fee3af72df0de7b60b96c525ffe8baf4db0f0 (patch)
tree2ef57937c4aedce2879d9af2cd8ce183342e9c1a /kernel
parent6e243f86d1424d7a1d67da4f8527239a786d9c2f (diff)
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 a8b0ca17b80e92faab46ee7179ba9e99ccb61233 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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 9efe7108cca..32a61513f89 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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)