From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753228AbcELO2A (ORCPT ); Thu, 12 May 2016 10:28:00 -0400 Received: from mail.kernel.org ([198.145.29.136]:46469 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753199AbcELO16 (ORCPT ); Thu, 12 May 2016 10:27:58 -0400 Date: Thu, 12 May 2016 11:27:52 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Steven Rostedt , LKML , Ingo Molnar Subject: Re: [PATCH] tools lib traceevent: Do not reassign parg after collapse_tree() Message-ID: <20160512142752.GJ20258@kernel.org> References: <20160511150936.678c18a1@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, May 12, 2016 at 09:57:13PM +0900, Namhyung Kim escreveu: > Hi Steve, > > On Thu, May 12, 2016 at 4:09 AM, Steven Rostedt wrote: > > > > At the end of process_filter(), collapse_tree() was changed to update the > > parg parameter, but the reassignment after the call wasn't removed. > > What happens is that the "current_op" gets modified and freed and parg > > is assigned to the new allocated argument. But after the call to > > collapse_tree(), parg is assigned again to the just freed "current_op", > > and this causes the tool to crash. > > > > current_op must also be assigned to NULL in case of error, otherwise it > > will cause it to be free()ed twice. > > > > Cc: stable@vger.kernel.org # 3.14+ > > Fixes: 42d6194d133c ("tools lib traceevent: Refactor process_filter()") > > Signed-off-by: Steven Rostedt > Acked-by: Namhyung Kim Thanks, applied to perf/urgent. - Arnaldo