kernel-ark/kernel/trace
KOSAKI Motohiro 10dd3ebe21 tracing: fix deadlock when setting set_ftrace_pid
Impact: fix deadlock while using set_ftrace_pid

Reproducer:

	# cd /sys/kernel/debug/tracing
	# echo $$ > set_ftrace_pid

	then, console becomes hung.

Details:

when writing set_ftracepid, kernel callstack is following

	ftrace_pid_write()
		mutex_lock(&ftrace_lock);
		ftrace_update_pid_func()
			mutex_lock(&ftrace_lock);
			mutex_unlock(&ftrace_lock);
		mutex_unlock(&ftrace_lock);

then, system always deadlocks when ftrace_pid_write() is called.

In past days, ftrace_pid_write() used ftrace_start_lock, but
commit e6ea44e9b4 consolidated
ftrace_start_lock to ftrace_lock.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <srostedt@redhat.com>
LKML-Reference: <20090306151155.0778.A69D9226@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-03-06 12:07:38 +01:00
..
blktrace.c tracing: remove extra latency_trace method from trace structure 2009-03-04 21:42:04 -05:00
events.c tracing: add raw trace point recording infrastructure 2009-02-28 03:09:32 -05:00
ftrace.c tracing: fix deadlock when setting set_ftrace_pid 2009-03-06 12:07:38 +01:00
Kconfig tracing: current tip/master can't enable ftrace 2009-03-06 11:56:42 +01:00
kmemtrace.c tracing: Introduce trace_buffer_{lock_reserve,unlock_commit} 2009-02-06 01:01:41 +01:00
Makefile tracing: add format files for ftrace default entries 2009-03-05 21:46:44 -05:00
ring_buffer.c tracing: make all file_operations const 2009-03-05 21:46:40 -05:00
trace_boot.c tracing: Introduce trace_buffer_{lock_reserve,unlock_commit} 2009-02-06 01:01:41 +01:00
trace_branch.c tracing: remove extra latency_trace method from trace structure 2009-03-04 21:42:04 -05:00
trace_clock.c tracing: implement trace_clock_*() APIs 2009-02-26 18:44:06 +01:00
trace_event_types.h tracing: add format files for ftrace default entries 2009-03-05 21:46:44 -05:00
trace_events_stage_1.h tracing: add TRACE_FIELD_SPECIAL to record complex entries 2009-03-02 10:53:15 -05:00
trace_events_stage_2.h tracing: move print of event format to separate file 2009-03-05 21:46:42 -05:00
trace_events_stage_3.h tracing: add lockdep tracepoints for lock acquire/release 2009-03-04 18:49:58 +01:00
trace_events.c tracing: add format files for ftrace default entries 2009-03-05 21:46:44 -05:00
trace_export.c tracing: add format files for ftrace default entries 2009-03-05 21:46:44 -05:00
trace_format.h tracing: add format files for ftrace default entries 2009-03-05 21:46:44 -05:00
trace_functions_graph.c tracing/function-graph-tracer: use the more lightweight local clock 2009-03-05 12:14:41 +01:00
trace_functions.c tracing/core: use appropriate waiting on trace_pipe 2009-02-18 01:40:20 +01:00
trace_hw_branches.c tracing/hw-branch-tracing: convert bts-tracer mutex to a spinlock 2009-02-25 09:16:01 +01:00
trace_irqsoff.c tracing: have latency tracers set the latency format 2009-03-04 22:15:30 -05:00
trace_mmiotrace.c mmiotrace: count events lost due to not recording 2009-02-15 20:02:42 +01:00
trace_nop.c trace: Call tracing_reset_online_cpus before tracer->init() 2009-02-06 01:01:41 +01:00
trace_output.c tracing: remove extra latency_trace method from trace structure 2009-03-04 21:42:04 -05:00
trace_output.h tracing: remove extra latency_trace method from trace structure 2009-03-04 21:42:04 -05:00
trace_power.c tracing: convert c/p state power tracer to use tracepoints 2009-02-13 09:06:18 -05:00
trace_sched_switch.c tracing/core: use appropriate waiting on trace_pipe 2009-02-18 01:40:20 +01:00
trace_sched_wakeup.c tracing: have latency tracers set the latency format 2009-03-04 22:15:30 -05:00
trace_selftest_dynamic.c
trace_selftest.c Merge branches 'tracing/blktrace', 'tracing/ftrace' and 'tracing/urgent' into tracing/core 2009-02-19 10:20:17 +01:00
trace_stack.c
trace_stat.c tracing: fix typing mistake in hint message and comments 2009-02-17 12:38:24 -05:00
trace_stat.h
trace_sysprof.c tracing: make all file_operations const 2009-03-05 21:46:40 -05:00
trace_workqueue.c
trace.c tracing: make all file_operations const 2009-03-05 21:46:40 -05:00
trace.h tracing: rename ftrace_printk() => trace_printk() 2009-03-05 10:24:48 +01:00