]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/profile: fix profile_disable vs module_unload
authorLi Zefan <lizf@cn.fujitsu.com>
Mon, 24 Aug 2009 04:19:47 +0000 (12:19 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Sun, 13 Sep 2009 02:28:38 +0000 (22:28 -0400)
commit980d1ebb2e5e5bdd5008718e57508906357fa980
treeaa7eeeee57fbf93d2ff3811a362ffef19be17c29
parentf2d128bb5f9709da935e953c0b68bc05e3af4f93
tracing/profile: fix profile_disable vs module_unload

If the correspoding module is unloaded before ftrace_profile_disable()
is called, event->profile_disable() won't be called, which can
cause oops:

  # insmod trace-events-sample.ko
  # perf record -f -a -e sample:foo_bar sleep 3 &
  # sleep 1
  # rmmod trace_events_sample
  # insmod trace-events-sample.ko
  OOPS!

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A9214E3.2070807@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_event_profile.c