uprobes: fix return value in error handling path
PATCH 1/1 uprobes: fix return value in error handling path
When I inject incorrect argument into uprobe_events,
[root@jovi tracing]# echo 'p:myprobe /bin/bash' > uprobe_events [root@jovi tracing]#
it doesn't return any error value in there, this patch fix it.
Signed-off-by zhangwei(Jovi) <[email protected]>
--- kernel/trace/trace_uprobe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/trace/trace_uprobe.c +3 -1
@@ -283,8 +283,10 @@ static int create_trace_uprobe(int argc, char **argv)return -EINVAL ; } arg =strchr (argv[1 ],':' ); -if (!arg) +if (!arg) { + ret = -EINVAL ; goto fail_address_parse; + } *arg++ ='\0' ; filename = argv[1 ];
Signature · 1 line
1.7.9.7
Steven Rostedt
maintainerSrikar,
Can you give an Ack (or nack) for this?
Thanks,
-- Steve
Quoted 28 lines · zhangwei(Jovi)
When I inject incorrect argument into
uprobe_events,[root@jovi tracing]# echo 'p:myprobe
/bin/bash' >uprobe_events[root@jovi tracing]#it doesn't return any error value in there, this patch fix it.
Signed-off-by zhangwei(Jovi) <[email protected]>--- kernel/trace/trace_uprobe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)kernel/trace/trace_uprobe.c +3
-1@@ -283,8 +283,10 @@ static int create_trace_uprobe(int argc, char **argv)return -EINVAL ; } arg =strchr (argv[1 ],':' ); -if (!arg) +if (!arg) { + ret = -EINVAL ; goto fail_address_parse; + } *arg++ ='\0' ; filename = argv[1 ];
Steven Rostedt
maintainerQuoted 4 lines · Steven Rostedt
Srikar,
Can you give an Ack (or nack) for this?
This looks rather obvious, I'll apply it and also tag it for stable.
-- Steve