mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 20:04:01 +00:00
tracing/urgent: warn in case of ftrace_start_up inbalance
Prevent from further ftrace_start_up inbalances so that we avoid future nop patching omissions with dynamic ftrace. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
c85a17e226
commit
9ea1a153a4
1 changed files with 7 additions and 0 deletions
|
@ -1224,6 +1224,13 @@ static void ftrace_shutdown(int command)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ftrace_start_up--;
|
ftrace_start_up--;
|
||||||
|
/*
|
||||||
|
* Just warn in case of unbalance, no need to kill ftrace, it's not
|
||||||
|
* critical but the ftrace_call callers may be never nopped again after
|
||||||
|
* further ftrace uses.
|
||||||
|
*/
|
||||||
|
WARN_ON_ONCE(ftrace_start_up < 0);
|
||||||
|
|
||||||
if (!ftrace_start_up)
|
if (!ftrace_start_up)
|
||||||
command |= FTRACE_DISABLE_CALLS;
|
command |= FTRACE_DISABLE_CALLS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue