Skip to content

Commit

Permalink
tracing/filters: don't remove old filters when failed to write subsys…
Browse files Browse the repository at this point in the history
…->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 <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Apr 21, 2009
1 parent cb4764a commit e8082f3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e8082f3

Please sign in to comment.