Messages in this thread Patch in this message | | | Date | Sat, 8 Aug 2009 18:02:11 +0200 | From | Ingo Molnar <> | Subject | Re: [2.6.31 PATCH] tracing/filters: always free pred on filter_add_subsystem_pred() failure |
| |
* Tom Zanussi <tzanussi@gmail.com> wrote:
> If filter_add_subsystem_pred() fails due to ENOSPC or ENOMEM, the > pred doesn't get freed, while as a side effect it does for other > errors. Make it so the caller always frees the pred for any error.
thanks, i've queued this up for .31.
Just to make sure: tracing/core has the filter code changed substantially, and this issue seems to be moot there - correct?
So the total impact from both patches on -tip is the patch below - right?
Ingo
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 27c2dbe..490337a 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -1050,6 +1050,8 @@ static int replace_preds(struct event_subsystem *system, pred = create_pred(elt->op, operand1, operand2); add_pred: + if (!pred) + return -ENOMEM; if (call) err = filter_add_pred(ps, call, pred, false); else
| |