public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Vince Weaver <vincent.weaver@maine.edu>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [GIT PULL] tracing: Have filter check for balanced ops
Date: Mon, 22 Jun 2015 14:53:17 +0100	[thread overview]
Message-ID: <20150622135317.GB2036@ares> (raw)
In-Reply-To: <20150617083638.20304e44@gandalf.local.home>

Hi Steven,

On Wed, Jun 17, 2015 at 08:36:38AM -0400, Steven Rostedt wrote:
...
> diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
> index ced69da0ff55..7f2e97ce71a7 100644
> --- a/kernel/trace/trace_events_filter.c
> +++ b/kernel/trace/trace_events_filter.c
> @@ -1369,19 +1369,26 @@ static int check_preds(struct filter_parse_state *ps)
>  {
>  	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)
> +			cnt--;

Since the OP_NOT was introduced only with e12c09cf3087 ("tracing: Add
NOT to filtering logic"), how would stable kernels backport this fix?
Do you think that just dropping the 'if' and do the 'cnt--'
unconditionally would be ok?

Cheers,
--
Luís

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2015-06-22 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 12:36 [GIT PULL] tracing: Have filter check for balanced ops Steven Rostedt
2015-06-22 13:53 ` Luis Henriques [this message]
2015-06-22 14:03   ` Luis Henriques
2015-06-22 14:17     ` Steven Rostedt
2015-06-22 14:49       ` Luis Henriques
2015-06-24 14:54         ` Greg KH
2015-06-25  4:03 ` Sasha Levin
2015-06-25  4:35   ` Steven Rostedt
2015-06-25 20:11     ` Sasha Levin
2015-06-25 23:08       ` Steven Rostedt

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=20150622135317.GB2036@ares \
    --to=luis.henriques@canonical.com \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.weaver@maine.edu \
    /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