Patchwork [3.5.y.z,extended,stable] Patch "tracing: Keep overwrite in sync between regular and snapshot" has been added to staging queue

login
register
mail settings
Submitter Luis Henriques
Date March 25, 2013, 6:02 p.m.
Message ID <1364234535-8622-1-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/230868/
State New
Headers show

Comments

Luis Henriques - March 25, 2013, 6:02 p.m.
This is a note to let you know that I have just added a patch titled

    tracing: Keep overwrite in sync between regular and snapshot

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From 84fdfb7aace654ce13fc675d5046bc0692545cb6 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Date: Thu, 14 Mar 2013 14:20:54 -0400
Subject: [PATCH] tracing: Keep overwrite in sync between regular and snapshot
 buffers

commit 80902822658aab18330569587cdb69ac1dfdcea8 upstream.

Changing the overwrite mode for the ring buffer via the trace
option only sets the normal buffer. But the snapshot buffer could
swap with it, and then the snapshot would be in non overwrite mode
and the normal buffer would be in overwrite mode, even though the
option flag states otherwise.

Keep the two buffers overwrite modes in sync.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
[ luis: adjust context ]
Luis Henriques <luis.henriques@canonical.com>
---
 kernel/trace/trace.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--
1.8.1.2

Patch

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index bd1df78..199f77b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2776,8 +2776,12 @@  static void set_tracer_flags(unsigned int mask, int enabled)
 	if (mask == TRACE_ITER_RECORD_CMD)
 		trace_event_enable_cmd_record(enabled);

-	if (mask == TRACE_ITER_OVERWRITE)
+	if (mask == TRACE_ITER_OVERWRITE) {
 		ring_buffer_change_overwrite(global_trace.buffer, enabled);
+#ifdef CONFIG_TRACER_MAX_TRACE
+		ring_buffer_change_overwrite(max_tr.buffer, enabled);
+#endif
+	}
 }

 static ssize_t