From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com ([209.85.212.178]:34719 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754661AbbFWNWx (ORCPT ); Tue, 23 Jun 2015 09:22:53 -0400 Subject: Re: Patch "tracing: Have filter check for balanced ops" has been added to the 3.14-stable tree To: gregkh@linuxfoundation.org, rostedt@goodmis.org References: <1435029721180139@kroah.com> Cc: stable@vger.kernel.org, stable-commits@vger.kernel.org From: Jiri Slaby Message-ID: <55895DAA.4030404@suse.cz> Date: Tue, 23 Jun 2015 15:22:50 +0200 MIME-Version: 1.0 In-Reply-To: <1435029721180139@kroah.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. > > > From 2cf30dc180cea808077f003c5116388183e54f9e Mon Sep 17 00:00:00 2001 > From: Steven Rostedt > Date: Mon, 15 Jun 2015 17:50:25 -0400 > Subject: tracing: Have filter check for balanced ops > > From: Steven Rostedt > > 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