summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_uprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_uprobe.c')
-rw-r--r--kernel/trace/trace_uprobe.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 06c22bad776..15b8eceeddc 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -552,17 +552,18 @@ static int probe_event_enable(struct trace_uprobe *tu, int flag)
return -EINTR;
utc->cons.handler = uprobe_dispatcher;
+ utc->tu = tu;
+ tu->consumer = utc;
+ tu->flags |= flag;
+
ret = uprobe_register(tu->inode, tu->offset, &utc->cons);
if (ret) {
+ tu->consumer = NULL;
+ tu->flags &= ~flag;
kfree(utc);
- return ret;
}
- tu->flags |= flag;
- utc->tu = tu;
- tu->consumer = utc;
-
- return 0;
+ return ret;
}
static void probe_event_disable(struct trace_uprobe *tu, int flag)