Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933413AbbFVNxi (ORCPT ); Mon, 22 Jun 2015 09:53:38 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33350 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754875AbbFVNxY (ORCPT ); Mon, 22 Jun 2015 09:53:24 -0400 Date: Mon, 22 Jun 2015 14:53:17 +0100 From: Luis Henriques To: Steven Rostedt Cc: Linus Torvalds , LKML , Ingo Molnar , Peter Zijlstra , Vince Weaver , Arnaldo Carvalho de Melo Subject: Re: [GIT PULL] tracing: Have filter check for balanced ops Message-ID: <20150622135317.GB2036@ares> References: <20150617083638.20304e44@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150617083638.20304e44@gandalf.local.home> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1157 Lines: 41 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/