kprobes: Make hash_64() as always inlined
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 14 Mar 2013 11:52:30 +0000 (20:52 +0900)
committerIngo Molnar <mingo@kernel.org>
Mon, 18 Mar 2013 09:21:23 +0000 (10:21 +0100)
commit65c10553552b487a71bf5e4676743435046fae6f
tree61abac32cacb38f4d0b59e64a5ba39026e65ecd6
parenta0bf225db77d6b4f981ffe52c50fedb00cf1836c
kprobes: Make hash_64() as always inlined

Because hash_64() is called from the get_kprobe() inside
int3 handler, kernel causes int3 recursion and crashes if
kprobes user puts a probe on it.

Usually hash_64() is inlined into caller function, but in
some cases, it has instances by gcc's interprocedural
constant propagation.

This patch uses __always_inline instead of inline to
prevent gcc from doing such things.

Reported-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Nadia Yvette Chambers <nyc@holomorphy.com>
Cc: yrl.pp-manager.tt@hitachi.com
Cc: David S. Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20130314115230.19690.39387.stgit@mhiramat-M0-7522
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/hash.h