This is a note to let you know that I've just added the patch titled

    tracing: Fix preempt count leak

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tracing-fix-preempt-count-leak.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 1dbd1951f39e13da579ffe879cce19586d0462de Mon Sep 17 00:00:00 2001
From: Li Zefan <[email protected]>
Date: Thu, 9 Dec 2010 15:47:56 +0800
Subject: tracing: Fix preempt count leak

From: Li Zefan <[email protected]>

commit 1dbd1951f39e13da579ffe879cce19586d0462de upstream.

While running my ftrace stress test, this showed up:

BUG: sleeping function called from invalid context at mm/mmap.c:233
...
note: cat[3293] exited with preempt_count 1

The bug was introduced by commit 91e86e560d0b3ce4c5fc64fd2bbb99f856a30a4e
("tracing: Fix recursive user stack trace")

Signed-off-by: Li Zefan <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 kernel/trace/trace.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1313,12 +1313,10 @@ ftrace_trace_userstack(struct ring_buffe
 
        __this_cpu_inc(user_stack_count);
 
-
-
        event = trace_buffer_lock_reserve(buffer, TRACE_USER_STACK,
                                          sizeof(*entry), flags, pc);
        if (!event)
-               return;
+               goto out_drop_count;
        entry   = ring_buffer_event_data(event);
 
        entry->tgid             = current->tgid;
@@ -1333,8 +1331,8 @@ ftrace_trace_userstack(struct ring_buffe
        if (!filter_check_discard(call, entry, buffer, event))
                ring_buffer_unlock_commit(buffer, event);
 
+ out_drop_count:
        __this_cpu_dec(user_stack_count);
-
  out:
        preempt_enable();
 }


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/tracing-fix-preempt-count-leak.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to