android_kernel_samsung_msm8976/kernel/trace
Masami Hiramatsu 02ca1521ad ftrace/kprobes: Fix not to delete probes if in use
Fix kprobe-tracer not to delete a probe if the probe is in use.
In that case, delete operation will return -EBUSY.

This bug can cause a kernel panic if enabled probes are deleted
during perf record.

(Add some probes on functions)
sh-4.2# perf probe --del probe:\*
sh-4.2# exit
(kernel panic)

This is originally reported on the fedora bugzilla:

 https://bugzilla.redhat.com/show_bug.cgi?id=742383

I've also checked that this problem doesn't happen on
tracepoints when module removing because perf event
locks target module.

$ sudo ./perf record -e xfs:\* -aR sh
sh-4.2# rmmod xfs
ERROR: Module xfs is in use
sh-4.2# exit
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.203 MB perf.data (~8862 samples) ]

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/20111004104438.14591.6553.stgit@fedora15
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-10-10 15:13:03 -04:00
..
blktrace.c blktrace: add FLUSH/FUA support 2011-08-11 10:36:05 +02:00
ftrace.c Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core 2011-07-21 09:32:40 +02:00
Kconfig trace events: Update version number reference to new 3.x scheme for EVENT_POWER_TRACING_DEPRECATED 2011-07-25 09:37:21 +02:00
Makefile tracing: Fix TRACE_EVENT power tracepoint creation 2011-01-07 23:26:29 -05:00
power-traces.c perf: Clean up power events by introducing new, more generic ones 2011-01-04 08:16:54 +01:00
ring_buffer.c ring-buffer: Set __GFP_NORETRY flag for ring buffer allocating process 2011-06-14 22:48:51 -04:00
ring_buffer_benchmark.c tracing: Use NUMA allocation for per-cpu ring buffer pages 2011-06-14 22:04:39 -04:00
trace.c tracing: Have dynamic size event stack traces 2011-07-14 16:36:53 -04:00
trace.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
trace_branch.c tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_clock.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_entries.h tracing: Have dynamic size event stack traces 2011-07-14 16:36:53 -04:00
trace_event_perf.c tracing: New flag to allow non privileged users to use a trace event 2010-11-18 14:37:40 +01:00
trace_events.c Merge branch 'perf/urgent' into perf/core 2011-07-21 09:29:21 +02:00
trace_events_filter.c tracing: Fix bug when reading system filters on module removal 2011-07-07 11:19:18 -04:00
trace_export.c tracing: Replace trace_event struct array with pointer array 2011-02-02 21:37:13 -05:00
trace_functions.c ftrace: Fix regression of :mod:module function enabling 2011-07-07 11:30:08 -04:00
trace_functions_graph.c tracing: Still trace filtered irq functions when irq trace is disabled 2011-07-07 22:26:27 -04:00
trace_irqsoff.c tracing, function_graph: Remove dependency of abstime and duration fields on latency 2011-06-14 22:48:47 -04:00
trace_kdb.c kdb,ftdump: Remove reference to internal kdb include 2010-10-22 15:34:11 -05:00
trace_kprobe.c ftrace/kprobes: Fix not to delete probes if in use 2011-10-10 15:13:03 -04:00
trace_mmiotrace.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
trace_nop.c
trace_output.c tracing: Have dynamic size event stack traces 2011-07-14 16:36:53 -04:00
trace_output.h tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_printk.c tracing: Fix regression in printk_formats file 2011-06-09 08:42:15 -04:00
trace_sched_switch.c tracing: Remove obsolete sched_switch tracer 2011-02-08 17:14:56 -05:00
trace_sched_wakeup.c tracing, function_graph: Remove dependency of abstime and duration fields on latency 2011-06-14 22:48:47 -04:00
trace_selftest.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_selftest_dynamic.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_stack.c tracing: Convert to kstrtoul_from_user 2011-06-14 22:48:50 -04:00
trace_stat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_stat.h
trace_syscalls.c tracing/syscalls: Early terminate search for sys_ni_syscall 2011-02-07 21:30:14 -05:00
trace_workqueue.c jump label: Initialize workqueue tracepoints *before* they are registered 2010-09-22 16:30:03 -04:00