From: Masami Hiramatsu Date: Wed, 12 Nov 2008 21:26:51 +0000 (-0800) Subject: kprobes: disable preempt for module_text_address() and kernel_text_address() X-Git-Tag: v2.6.28-rc5~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a189d0350f387786b1fb5a5d19e3a5ab0bc0cceb;p=pandora-kernel.git 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 Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Hiroshi Shimamoto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed