diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2008-11-12 22:26:51 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-13 02:17:16 +0100 |
commit | a189d0350f387786b1fb5a5d19e3a5ab0bc0cceb (patch) | |
tree | d6133d035e0d23a8271f12204e53338f8f343351 /kernel/fork.c | |
parent | freezer_cg: disable writing freezer.state of root cgroup (diff) | |
download | linux-a189d0350f387786b1fb5a5d19e3a5ab0bc0cceb.tar.xz linux-a189d0350f387786b1fb5a5d19e3a5ab0bc0cceb.zip |
kprobes: disable preempt for module_text_address() and kernel_text_address()
__register_kprobe() can be preempted after checking probing address but
before module_text_address() or try_module_get(), and in this interval
the module can be unloaded. In that case, try_module_get(probed_mod)
will access to invalid address, or kprobe will probe invalid address.
This patch uses preempt_disable() to protect it and uses
__module_text_address() and __kernel_text_address().
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions