aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-04-21 17:11:46 +0800
committerIngo Molnar <mingo@elte.hu>2009-04-21 11:58:27 +0200
commite8082f3f5a17d7a7bfc7dd1050a3f958dc034e9a (patch)
tree8c809037eb92171b1d8f9f2627111751d562267f
parentcb4764a6dbffd9bb3cf759421ae82384071a933d (diff)
tracing/filters: don't remove old filters when failed to write subsys->filter
If writing subsys->filter returns EINVAL or ENOSPC, the original filters in subsys/ and subsys/events/ will be removed. This is definitely wrong. [ Impact: fix filter setting semantics on error condition ] Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Tom Zanussi <tzanussi@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <49ED8DD2.2070700@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/trace/trace_events.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 672b195f86c..9ea55a7dfde 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -600,7 +600,6 @@ subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
err = filter_add_subsystem_pred(system, pred);
if (err < 0) {
- filter_free_subsystem_preds(system);
filter_free_pred(pred);
return err;
}