summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmver.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2013-06-27 16:58:31 +0200
committerSteven Rostedt <rostedt@goodmis.org>2013-07-02 02:34:22 +0200
commit6e94a780374ed31b280f939d4757e8d7858dff16 (patch)
treee319c403696469c0c818d5c4fe4b674b303eca9b /fs/ocfs2/dlm/dlmver.c
parentftrace: Fix stddev calculation in function profiler (diff)
downloadlinux-6e94a780374ed31b280f939d4757e8d7858dff16.tar.xz
linux-6e94a780374ed31b280f939d4757e8d7858dff16.zip
tracing: Failed to create system directory
Running the following: # cd /sys/kernel/debug/tracing # echo p:i do_sys_open > kprobe_events # echo p:j schedule >> kprobe_events # cat kprobe_events p:kprobes/i do_sys_open p:kprobes/j schedule # echo p:i do_sys_open >> kprobe_events # cat kprobe_events p:kprobes/j schedule p:kprobes/i do_sys_open # ls /sys/kernel/debug/tracing/events/kprobes/ enable filter j Notice that the 'i' is missing from the kprobes directory. The console produces: "Failed to create system directory kprobes" This is because kprobes passes in a allocated name for the system and the ftrace event subsystem saves off that name instead of creating a duplicate for it. But the kprobes may free the system name making the pointer to it invalid. This bug was introduced by 92edca073c37 "tracing: Use direct field, type and system names" which switched from using kstrdup() on the system name in favor of just keeping apointer to it, as the internal ftrace event system names are static and exist for the life of the computer being booted. Instead of reverting back to duplicating system names again, we can use core_kernel_data() to determine if the passed in name was allocated or static. Then use the MSB of the ref_count to be a flag to keep track if the name was allocated or not. Then we can still save from having to duplicate strings that will always exist, but still copy the ones that may be freed. Cc: stable@vger.kernel.org # 3.10 Reported-by: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com> Reported-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'fs/ocfs2/dlm/dlmver.c')
0 files changed, 0 insertions, 0 deletions