Masami Hiramatsu a189d0350f 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>
2008-11-12 17:17:16 -08:00
..
2008-10-22 07:37:17 +02:00
2008-10-16 11:21:30 -07:00
2008-03-30 14:18:41 -07:00
2008-09-14 16:25:35 +02:00
2008-07-28 14:37:38 +02:00
2007-07-16 09:05:50 -07:00
2008-08-13 12:55:10 +02:00
2008-10-28 11:19:07 +01:00
2008-09-02 19:21:40 -07:00
2008-10-20 08:52:39 -07:00
2008-10-21 15:59:53 +02:00
2008-11-10 10:51:51 +01:00
2008-11-11 11:57:22 +01:00
2008-11-05 10:30:14 +01:00
2007-07-16 09:05:50 -07:00
2008-11-06 08:41:56 +01:00
2008-10-16 11:21:31 -07:00
2008-02-06 10:41:02 -08:00
2008-10-16 11:21:51 -07:00
2008-07-25 10:53:45 -07:00
2008-10-16 11:21:47 -07:00
2008-10-16 11:21:31 -07:00