summaryrefslogtreecommitdiffstats
path: root/kernel/events/uprobes.c
diff options
context:
space:
mode:
authorOleg Nesterov2013-11-26 01:35:25 +0100
committerSteven Rostedt2014-01-03 02:57:04 +0100
commit72fd293aa9ae8f4f48d6042be43fe81551c639f2 (patch)
tree44216969149d0d1e7f022796decae3a13c9d64fa /kernel/events/uprobes.c
parenttracing/uprobes: Add support for full argument access methods (diff)
downloadkernel-qcow2-linux-72fd293aa9ae8f4f48d6042be43fe81551c639f2.tar.gz
kernel-qcow2-linux-72fd293aa9ae8f4f48d6042be43fe81551c639f2.tar.xz
kernel-qcow2-linux-72fd293aa9ae8f4f48d6042be43fe81551c639f2.zip
uprobes: Allocate ->utask before handler_chain() for tracing handlers
uprobe_trace_print() and uprobe_perf_print() need to pass the additional info to call_fetch() methods, currently there is no simple way to do this. current->utask looks like a natural place to hold this info, but we need to allocate it before handler_chain(). This is a bit unfortunate, perhaps we will find a better solution later, but this is simple and should work right now. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'kernel/events/uprobes.c')
-rw-r--r--kernel/events/uprobes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 24b7d6ca871b..3cc8e0bb8acf 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1828,6 +1828,10 @@ static void handle_swbp(struct pt_regs *regs)
if (unlikely(!test_bit(UPROBE_COPY_INSN, &uprobe->flags)))
goto out;
+ /* Tracing handlers use ->utask to communicate with fetch methods */
+ if (!get_utask())
+ goto out;
+
handler_chain(uprobe, regs);
if (can_skip_sstep(uprobe, regs))
goto out;