From: Prashanth Nageshappa Date: Mon, 5 Mar 2012 22:59:12 +0000 (-0800) Subject: kprobes: return proper error code from register_kprobe() X-Git-Tag: v3.2.10~62 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4050cecbafc6d1d89a5407f6df1dc2f08432eca4;p=pandora-kernel.git kprobes: return proper error code from register_kprobe() commit f986a499ef6f317d906e6f6f281be966e1237a10 upstream. register_kprobe() aborts if the address of the new request falls in a prohibited area (such as ftrace pouch, __kprobes annotated functions, non-kernel text addresses, jump label text). We however don't return the right error on this abort, resulting in a silent failure - incorrect adding/reporting of kprobes ('perf probe do_fork+18' or 'perf probe mcount' for instance). In V2 we are incorporating Masami Hiramatsu's feedback. This patch fixes it by returning -EINVAL upon failure. While we are here, rename the label used for exit to be more appropriate. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Prashanth K Nageshappa Acked-by: Masami Hiramatsu Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed