From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org, rostedt@goodmis.org
Cc: stable@vger.kernel.org, stable-commits@vger.kernel.org
Subject: Re: Patch "tracing: Have filter check for balanced ops" has been added to the 3.14-stable tree
Date: Tue, 23 Jun 2015 15:22:50 +0200 [thread overview]
Message-ID: <55895DAA.4030404@suse.cz> (raw)
In-Reply-To: <1435029721180139@kroah.com>
On 06/23/2015, 05:22 AM, gregkh@linuxfoundation.org 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 <stable@vger.kernel.org> know about it.
>
>
> From 2cf30dc180cea808077f003c5116388183e54f9e Mon Sep 17 00:00:00 2001
> From: Steven Rostedt <rostedt@goodmis.org>
> Date: Mon, 15 Jun 2015 17:50:25 -0400
> Subject: tracing: Have filter check for balanced ops
>
> From: Steven Rostedt <rostedt@goodmis.org>
>
> 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
next prev parent reply other threads:[~2015-06-23 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 3:22 Patch "tracing: Have filter check for balanced ops" has been added to the 3.14-stable tree gregkh
2015-06-23 13:22 ` Jiri Slaby [this message]
2015-06-23 13:40 ` Steven Rostedt
2015-06-24 14:55 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55895DAA.4030404@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=rostedt@goodmis.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox