aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorLi Zefan <[email protected]>2010-08-23 16:50:12 +0800
committerSteven Rostedt <[email protected]>2010-08-31 16:46:23 -0400
commit3aaba20f26f58843e8f20611e5c0b1c06954310f (patch)
treead15d7aa21af465ddf6091eb490d84312089f245 /lib/string_helpers.c
parentfa66f07aa1f0950e1dc78b7ab39728b3f8aa77a1 (diff)
tracing: Fix a race in function profile
While we are reading trace_stat/functionX and someone just disabled function_profile at that time, we can trigger this: divide error: 0000 [#1] PREEMPT SMP ... EIP is at function_stat_show+0x90/0x230 ... This fix just takes the ftrace_profile_lock and checks if rec->counter is 0. If it's 0, we know the profile buffer has been reset. Signed-off-by: Li Zefan <[email protected]> Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions