On 06/23/2015, 05:22 AM, [email protected] wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> tracing: Have filter check for balanced ops
>
> to the 3.14-stable tree which can be found at:
>
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
> tracing-have-filter-check-for-balanced-ops.patch
> and it can be found in the queue-3.14 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <[email protected]> know about it.
>
>
> From 2cf30dc180cea808077f003c5116388183e54f9e Mon Sep 17 00:00:00 2001
> From: Steven Rostedt <[email protected]>
> Date: Mon, 15 Jun 2015 17:50:25 -0400
> Subject: tracing: Have filter check for balanced ops
>
> From: Steven Rostedt <[email protected]>
>
> commit 2cf30dc180cea808077f003c5116388183e54f9e upstream.
...
> --- a/kernel/trace/trace_events_filter.c
> +++ b/kernel/trace/trace_events_filter.c
> @@ -1399,19 +1399,26 @@ static int check_preds(struct filter_par
> {
> int n_normal_preds = 0, n_logical_preds = 0;
> struct postfix_elt *elt;
> + int cnt = 0;
>
> list_for_each_entry(elt, &ps->postfix, list) {
> - if (elt->op == OP_NONE)
> + if (elt->op == OP_NONE) {
> + cnt++;
> continue;
> + }
>
> if (elt->op == OP_AND || elt->op == OP_OR) {
> n_logical_preds++;
> + cnt--;
> continue;
> }
> + if (elt->op != OP_NOT)
This breaks build, OP_NOT is not in 3.14 (or 3.10) yet. I dropped this
line for 3.12.
> + cnt--;
> n_normal_preds++;
> + WARN_ON_ONCE(cnt < 0);
> }
>
> - if (!n_normal_preds || n_logical_preds >= n_normal_preds) {
> + if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) {
> parse_error(ps, FILT_ERR_INVALID_FILTER, 0);
> return -EINVAL;
> }
>
>
thanks,
--
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html