[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-8e068542a8d9efec55126284d2f5cb32f003d507@git.kernel.org>
Date: Sat, 21 Nov 2009 13:35:44 GMT
From: tip-bot for Xiao Guangrong <xiaoguangrong@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
rostedt@...dmis.org, xiaoguangrong@...fujitsu.com,
tglx@...utronix.de
Subject: [tip:perf/core] tracing/ksym_tracer: fix write operation of ksym_trace_filter
Commit-ID: 8e068542a8d9efec55126284d2f5cb32f003d507
Gitweb: http://git.kernel.org/tip/8e068542a8d9efec55126284d2f5cb32f003d507
Author: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
AuthorDate: Wed, 22 Jul 2009 11:23:41 +0800
Committer: Steven Rostedt <rostedt@...dmis.org>
CommitDate: Thu, 23 Jul 2009 20:52:05 -0400
tracing/ksym_tracer: fix write operation of ksym_trace_filter
This patch fix 2 bugs:
- fix the return value of ksym_trace_filter_write() when we want to
clear symbol in ksym_trace_filter file
for example:
# echo global_trace:rw- > /debug/tracing/ksym_trace_filter
# echo global_trace:--- > /debug/tracing/ksym_trace_filter
-bash: echo: write error: Invalid argument
# cat /debug/tracing/ksym_trace_filter
#
We want to clear 'global_trace' in ksym_trace_filter, it complain
with "Invalid argument", but the operation is successful
- the "r--" access types is not allowed, but ksym_trace_filter file think
it OK
for example:
# echo ksym_tracer_mutex:r-- > ksym_trace_filter
-bash: echo: write error: Resource temporarily unavailable
# dmesg
ksym_tracer request failed. Try again later!!
The error occur at register_kernel_hw_breakpoint(), but It's should
at access types parser
Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
LKML-Reference: <4A66863D.5090802@...fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
---
kernel/trace/trace_ksym.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c
index fbf3a8e..cd5cb65 100644
--- a/kernel/trace/trace_ksym.c
+++ b/kernel/trace/trace_ksym.c
@@ -135,6 +135,9 @@ static int ksym_trace_get_access_type(char *str)
case 6:
access = HW_BREAKPOINT_RW;
break;
+ case 4:
+ access = -EINVAL;
+ break;
case 2:
access = HW_BREAKPOINT_WRITE;
break;
@@ -312,6 +315,7 @@ static ssize_t ksym_trace_filter_write(struct file *file,
kfree(entry->ksym_hbp->info.name);
kfree(entry->ksym_hbp);
kfree(entry);
+ ret = 0;
goto out;
} else {
/* Check for malformed request: (4) */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists