[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-0ac2058f686a19fe8ab25c4f3104fc1580dce7cf@git.kernel.org>
Date: Mon, 15 Jun 2009 18:13:50 GMT
From: tip-bot for Li Zefan <lizf@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
fweisbec@...il.com, rostedt@...dmis.org, lizf@...fujitsu.com,
tglx@...utronix.de
Subject: [tip:tracing/urgent] tracing/filters: strloc should be unsigned short
Commit-ID: 0ac2058f686a19fe8ab25c4f3104fc1580dce7cf
Gitweb: http://git.kernel.org/tip/0ac2058f686a19fe8ab25c4f3104fc1580dce7cf
Author: Li Zefan <lizf@...fujitsu.com>
AuthorDate: Mon, 15 Jun 2009 10:59:17 +0800
Committer: Steven Rostedt <rostedt@...dmis.org>
CommitDate: Mon, 15 Jun 2009 11:37:18 -0400
tracing/filters: strloc should be unsigned short
I forgot to update filter code accordingly in
"tracing/events: change the type of __str_loc_item to unsigned short"
(commt b0aae68cc5508f3c2fbf728988c954db4c8b8a53)
It can cause system crash:
# echo 1 > tracing/events/irq/irq_handler_entry/enable
# echo 'name == eth0' > tracing/events/irq/irq_handler_entry/filter
[ Impact: fix crash while filtering on __string() field ]
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
LKML-Reference: <4A35B905.3090500@...fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
---
kernel/trace/trace_events_filter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 1d81923..b24ab0e 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -178,7 +178,7 @@ static int filter_pred_string(struct filter_pred *pred, void *event,
static int filter_pred_strloc(struct filter_pred *pred, void *event,
int val1, int val2)
{
- int str_loc = *(int *)(event + pred->offset);
+ unsigned short str_loc = *(unsigned short *)(event + pred->offset);
char *addr = (char *)(event + str_loc);
int cmp, match;
--
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