Skip to content

Commit 3baa5e4

Browse files
tzanussirostedt
authored andcommitted
tracing: Fix disabling of soft disable
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>
1 parent 44a6a4e commit 3baa5e4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎kernel/trace/trace_events.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,11 @@ static int __ftrace_event_enable_disable(struct ftrace_event_file *file,
291291
}
292292
call->class->reg(call, TRACE_REG_UNREGISTER, file);
293293
}
294-
/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT */
294+
/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT, else clear it */
295295
if (file->flags & FTRACE_EVENT_FL_SOFT_MODE)
296296
set_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
297+
else
298+
clear_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
297299
break;
298300
case 1:
299301
/*

0 commit comments

Comments
 (0)