]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/trace/trace_uprobe.c
Merge tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / kernel / trace / trace_uprobe.c
index 7fb9353b47d9053548e367ceb52ff121305c96d2..1ceedb9146b114e6225a7662044c6b00c4cba136 100644 (file)
@@ -430,8 +430,6 @@ static int register_trace_uprobe(struct trace_uprobe *tu)
 /*
  * Argument syntax:
  *  - Add uprobe: p|r[:[GRP/]EVENT] PATH:OFFSET [FETCHARGS]
- *
- *  - Remove uprobe: -:[GRP/]EVENT
  */
 static int trace_uprobe_create(int argc, const char **argv)
 {
@@ -447,10 +445,17 @@ static int trace_uprobe_create(int argc, const char **argv)
        ret = 0;
        ref_ctr_offset = 0;
 
-       /* argc must be >= 1 */
-       if (argv[0][0] == 'r')
+       switch (argv[0][0]) {
+       case 'r':
                is_return = true;
-       else if (argv[0][0] != 'p' || argc < 2)
+               break;
+       case 'p':
+               break;
+       default:
+               return -ECANCELED;
+       }
+
+       if (argc < 2)
                return -ECANCELED;
 
        if (argv[0][1] == ':')
@@ -1323,7 +1328,7 @@ static inline void init_trace_event_call(struct trace_uprobe *tu)
        call->event.funcs = &uprobe_funcs;
        call->class->define_fields = uprobe_event_define_fields;
 
-       call->flags = TRACE_EVENT_FL_UPROBE;
+       call->flags = TRACE_EVENT_FL_UPROBE | TRACE_EVENT_FL_CAP_ANY;
        call->class->reg = trace_uprobe_register;
        call->data = tu;
 }