summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_uprobe.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-06-24 19:25:52 +0200
committerIngo Molnar <mingo@kernel.org>2019-06-24 19:25:52 +0200
commitb9271f0c65e12efd9b6319f57a378aac1be98b22 (patch)
tree923cd44cd4e1568d3abf2b8d69b4a4712e01f8ef /kernel/trace/trace_uprobe.c
parentMerge tag 'perf-core-for-mingo-5.3-20190621' of git://git.kernel.org/pub/scm/... (diff)
parentLinux 5.2-rc6 (diff)
downloadlinux-b9271f0c65e12efd9b6319f57a378aac1be98b22.tar.xz
linux-b9271f0c65e12efd9b6319f57a378aac1be98b22.zip
Merge tag 'v5.2-rc6' into perf/core, to refresh branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/trace/trace_uprobe.c')
-rw-r--r--kernel/trace/trace_uprobe.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 0d60d6856de5..7860e3f59fad 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -426,8 +426,6 @@ end:
/*
* 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)
{
@@ -443,10 +441,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] == ':')