|
@@ -925,14 +925,17 @@ static int create_trace_probe(int argc, char **argv)
|
|
pr_info("Delete command needs an event name.\n");
|
|
pr_info("Delete command needs an event name.\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
+ mutex_lock(&probe_lock);
|
|
tp = find_probe_event(event, group);
|
|
tp = find_probe_event(event, group);
|
|
if (!tp) {
|
|
if (!tp) {
|
|
|
|
+ mutex_unlock(&probe_lock);
|
|
pr_info("Event %s/%s doesn't exist.\n", group, event);
|
|
pr_info("Event %s/%s doesn't exist.\n", group, event);
|
|
return -ENOENT;
|
|
return -ENOENT;
|
|
}
|
|
}
|
|
/* delete an event */
|
|
/* delete an event */
|
|
unregister_trace_probe(tp);
|
|
unregister_trace_probe(tp);
|
|
free_trace_probe(tp);
|
|
free_trace_probe(tp);
|
|
|
|
+ mutex_unlock(&probe_lock);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|