Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbdDJCQU (ORCPT ); Sun, 9 Apr 2017 22:16:20 -0400 Received: from mga14.intel.com ([192.55.52.115]:60100 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbdDJCQT (ORCPT ); Sun, 9 Apr 2017 22:16:19 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,180,1488873600"; d="asc'?scan'208";a="843945577" Date: Mon, 10 Apr 2017 10:13:19 +0800 From: "Du, Changbin" To: Jiri Olsa Cc: "Du, Changbin" , Arnaldo Carvalho de Melo , Namhyung Kim , Jiri Olsa , Peter Zijlstra , Ingo Molnar , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field Message-ID: <20170410021319.GA7872@intel.com> References: <20170315021631.31980-1-changbin.du@intel.com> <20170327062255.27309-1-changbin.du@intel.com> <20170404151940.GD12903@kernel.org> <20170404155103.GF12903@kernel.org> <20170405024422.GA4361@intel.com> <20170409170552.GA16624@krava> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20170409170552.GA16624@krava> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2538 Lines: 76 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 09, 2017 at 07:05:52PM +0200, Jiri Olsa wrote: > On Wed, Apr 05, 2017 at 10:44:22AM +0800, Du, Changbin wrote: > > On Tue, Apr 04, 2017 at 12:51:03PM -0300, Arnaldo Carvalho de Melo wrot= e: > > > Em Wed, Apr 05, 2017 at 12:34:59AM +0900, Namhyung Kim escreveu: > > > > Hi Arnaldo, > > > >=20 > > > > On Wed, Apr 5, 2017 at 12:19 AM, Arnaldo Carvalho de Melo > > > > wrote: > > > > > Em Mon, Mar 27, 2017 at 02:22:55PM +0800, changbin.du@intel.com e= screveu: > > > > >> From: Changbin Du > > > > >> > > > > >> Some perf_hpp_fmt both registered at field and sort list. For su= ch > > > > >> instance, we only can free it when removed from the both lists. = This > > > > >> function currently only used by self-test code, but still should= fix > > > > >> it. > > > > > > > > > > Looks sane, applying, > > > > > > > > > > Jiri, Namhyung, please holler (or ack) if needed, > > > >=20 > > > > Did you actually see the double free problem? AFAICS the old code > > >=20 > > > I assumed that he had seen it, in some self-test code, Changbin, can = you > > > please show command output or further describe when this patch would = be > > > necessary? > > >=20 > > Arnaldo, I did observe this issue but not in self-test code. The self-t= est code > > uses that function but does not have a case that a fmt linked to two bo= th list.=20 > > I found this issue when I try to add 'dynamic sort' feature to perf, wh= ich > > I use this function to reset out fields. >=20 > could you post it with the rest of your patches? might be easier to review > jirka, I am sorry that the 'dynamic sort' is only half done. Now I am very busy with work at hand. I will send the rest of patches when I finish them. Could we check out this fix first? > thanks, > jirka --=20 Thanks, Changbin Du --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJY6uo/AAoJEAanuZwLnPNULLUIAIaBoFNsfcgwCL7NCK73tUGv 8jH7tNOIRaq1RtepdEKi2bmFx+Hc0pwZtyV5hXE+U3jp4tHw6KmtLBZisQZEfE95 yo7Ej4+tOg51NW1dRzEtDXlc73HqIg1s+l8B7Vz8wWENKk1qlheT5sBKFMzNaTU4 m5uJKD/gC4vpz4NAJFReXElJ3LDf1c7p9ttGeQDnXPtOPpkr4bzpBMSGfaRG9zhk pN+ZbZ7EqqCQJe6Ivmrei0CpwRsKc2by/+MA0k2bHBjsHFFMQ3SBzcIla8X8GM4C CSAB+dK78A0LZ4Dn65nO+R1v0k8gzgVGcmJXYo6lEJ7stlnIUt19/DHxsWLFYlc= =VfYl -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--