mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [for-next][PATCH 06/14] tracing: Fix disabling of soft disable
Date: Tue, 02 Jul 2013 16:22:22 -0400	[thread overview]
Message-ID: <20130702202426.151542980@goodmis.org> (raw)
In-Reply-To: <20130702202216.623562799@goodmis.org>

[-- Attachment #1: 0006-tracing-Fix-disabling-of-soft-disable.patch --]
[-- Type: text/plain, Size: 1570 bytes --]

From: Tom Zanussi <tom.zanussi@linux.intel.com>

The comment on the soft disable 'disable' case of
__ftrace_event_enable_disable() states that the soft disable bit
should be cleared in that case, but currently only the soft mode bit
is actually cleared.

This essentially leaves the standard non-soft-enable enable/disable
paths as the only way to clear the soft disable flag, but the soft
disable bit should also be cleared when removing a trigger with '!'.

Also, the SOFT_DISABLED bit should never be set if SOFT_MODE is
cleared.

This fixes the above discrepancies.

Link: http://lkml.kernel.org/r/b9c68dd50bc07019e6c67d3f9b29be4ef1b2badb.1372479499.git.tom.zanussi@linux.intel.com

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_events.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 7ee08b9..5892470 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -291,9 +291,11 @@ static int __ftrace_event_enable_disable(struct ftrace_event_file *file,
 			}
 			call->class->reg(call, TRACE_REG_UNREGISTER, file);
 		}
-		/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT */
+		/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT, else clear it */
 		if (file->flags & FTRACE_EVENT_FL_SOFT_MODE)
 			set_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
+		else
+			clear_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
 		break;
 	case 1:
 		/*
-- 
1.7.10.4



  parent reply	other threads:[~2013-07-02 20:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 20:22 [for-next][PATCH 00/14] tracing: updates and fixes for 3.10 Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 01/14] tracing: Failed to create system directory Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 02/14] tracing/kprobes: Avoid perf_trace_buf_*() if ->perf_events is empty Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 03/14] tracing/kprobes: Kill probe_enable_lock Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 04/14] tracing: Simplify code for showing of soft disabled flag Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 05/14] tracing: Add missing syscall_metadata comment Steven Rostedt
2013-07-02 20:22 ` Steven Rostedt [this message]
2013-07-02 20:22 ` [for-next][PATCH 07/14] tracing/kprobes: Turn trace_probe->files into list_head Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 08/14] tracing: Use flag buffer_disabled for irqsoff tracer Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 09/14] tracing/kprobes: Dont pass addr=ip to perf_trace_buf_submit() Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 10/14] ftrace: Do not run selftest if command line parameter is set Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 11/14] tracing: Make trace_marker use the correct per-instance buffer Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 12/14] tracing: Protect ftrace_trace_arrays list in trace_events.c Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 13/14] tracing: Add trace_array_get/put() to handle instance refs better Steven Rostedt
2013-07-02 20:22 ` [for-next][PATCH 14/14] tracing: Get trace_array ref counts when accessing trace files Steven Rostedt
2014-04-05 14:59   ` Sasha Levin
2014-04-05 18:33     ` Steven Rostedt
2014-04-05 20:03       ` Sasha Levin
2014-04-08 15:42         ` Steven Rostedt
2014-04-08 16:06           ` Sasha Levin
2014-04-05 18:43     ` Steven Rostedt
2014-04-08 16:36     ` Steven Rostedt
2014-04-08 16:52       ` Sasha Levin
2014-04-08 17:06         ` Steven Rostedt
2014-04-08 17:11           ` Sasha Levin
2014-04-08 17:32             ` Steven Rostedt
2014-04-10 13:33               ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130702202426.151542980@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.zanussi@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome