From: Peter Zijlstra <a.p.zijls...@chello.nl>

                   -------------------
    This is a commit scheduled for the next v2.6.34 longterm release.
    http://git.kernel.org/?p=linux/kernel/git/paulg/longterm-queue-2.6.34.git
    If you see a problem with using this for longterm, please comment.
                   -------------------

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 <vweav...@eecs.utk.edu>
Signed-off-by: Peter Zijlstra <a.p.zijls...@chello.nl>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
[PG: backport from 2.6.32 queue, see https://lkml.org/lkml/2011/8/3/125 ]
Signed-off-by: Paul Gortmaker <paul.gortma...@windriver.com>
---
 kernel/perf_event.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index b203546..540c26b 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -3907,12 +3907,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;
-                       perf_pending_queue(&event->pending,
-                                          perf_pending_event);
-               } else
-                       perf_event_disable(event);
+               event->pending_disable = 1;
+               perf_pending_queue(&event->pending, perf_pending_event);
        }
 
        if (event->overflow_handler)
-- 
1.7.12.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to