kprobes: Cleanup disabling and unregistering path
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Fri, 3 Dec 2010 09:53:57 +0000 (18:53 +0900)
committerIngo Molnar <mingo@elte.hu>
Mon, 6 Dec 2010 16:59:29 +0000 (17:59 +0100)
commit6f0f1dd71953d4243c11e490dd49ef24ebaf6c0b
tree84a77def76610b59a2abfed87f548ab42b64da84
parent6d8e40a85ef72a0514ebd00748eb18cab432b200
kprobes: Cleanup disabling and unregistering path

Merge disabling kprobe to unregistering kprobe function
and add comments for disabing/unregistring process.

Current unregistering code disables(disarms) kprobes after
checking target kprobe status. This patch changes it to
disabling kprobe first after that it changing the kprobe's
state. This allows to share probe disabling code between
disable_kprobe() and unregister_kprobe().

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: 2nddept-manager@sdl.hitachi.co.jp
LKML-Reference: <20101203095356.2961.30152.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/kprobes.c