Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-05-31 Thread Jiri Olsa
On Wed, May 31, 2017 at 03:05:51PM +0800, Du, Changbin wrote: > > Hi jirka, Will you send a patch to fix this issue? If not I will send my > solution in a new thread. oops, forgot about this one.. I'll pick it up thanks, jirka

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-05-31 Thread Du, Changbin
Hi jirka, Will you send a patch to fix this issue? If not I will send my solution in a new thread. I have given up to add 'dynamic sort' feature since my code is not working and I am engaged in other things. I still hope this fix can be picked up. Thanks! On Wed, Apr 12, 2017 at 09:48:08AM +0800

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Du, Changbin
On Tue, Apr 11, 2017 at 12:32:49PM +0200, Jiri Olsa wrote: > On Tue, Apr 11, 2017 at 06:13:17PM +0800, Du, Changbin wrote: > > > > > > > > > yes, this is an option. But for safety, I sugguest do not rely on > > > > list_del_init. > > > > No rule rather than create one. > > > > > > > > But anywa

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Jiri Olsa
On Tue, Apr 11, 2017 at 06:13:17PM +0800, Du, Changbin wrote: > > > > > > > yes, this is an option. But for safety, I sugguest do not rely on > > > list_del_init. > > > No rule rather than create one. > > > > > > But anyway, both are ok for me. What's your options? > > > > hum, also I dont thi

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Jiri Olsa
On Tue, Apr 11, 2017 at 04:25:50PM +0800, Du, Changbin wrote: > > > (gdb) print fmt.sort_list > > > $5 = {next = 0x9727d0 , prev = 0x9727d0 > > > } > > > > > > In this case, the fmt is linked in sort_list, but not in list. So crash > > > at the list_del_init(&fmt->list) of second loop. > > > > s

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Du, Changbin
> > > > > yes, this is an option. But for safety, I sugguest do not rely on > > list_del_init. > > No rule rather than create one. > > > > But anyway, both are ok for me. What's your options? > > hum, also I dont think we need to touch that bit at all > if we are going to remove it right away.

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Du, Changbin
> > (gdb) print fmt.sort_list > > $5 = {next = 0x9727d0 , prev = 0x9727d0 > > } > > > > In this case, the fmt is linked in sort_list, but not in list. So crash > > at the list_del_init(&fmt->list) of second loop. > > so the only place I can see the POISON could get there > is in perf_hpp__column

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-11 Thread Jiri Olsa
On Tue, Apr 11, 2017 at 11:06:14AM +0800, Du, Changbin wrote: SNIP > > the original code takes it out of both lists, > > so the next itaration won't go over that entry > > > oh, my bad, my desc is wrong. I replayed the crash. The problem is > list_del_init a unlinked entry. > > perf: Segmentatio

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-10 Thread Du, Changbin
On Mon, Apr 10, 2017 at 01:33:25PM +0200, Jiri Olsa wrote: > On Mon, Apr 10, 2017 at 06:21:12PM +0800, Du, Changbin wrote: > > On Mon, Apr 10, 2017 at 10:39:50AM +0200, Jiri Olsa wrote: > > > On Tue, Apr 04, 2017 at 12:19:40PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > SNIP > > > > > > >

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-10 Thread Jiri Olsa
On Mon, Apr 10, 2017 at 06:21:12PM +0800, Du, Changbin wrote: > On Mon, Apr 10, 2017 at 10:39:50AM +0200, Jiri Olsa wrote: > > On Tue, Apr 04, 2017 at 12:19:40PM -0300, Arnaldo Carvalho de Melo wrote: > > > > SNIP > > > > > > --- > > > > tools/perf/ui/hist.c | 25 +++-- > > >

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-10 Thread Du, Changbin
On Mon, Apr 10, 2017 at 10:39:50AM +0200, Jiri Olsa wrote: > On Tue, Apr 04, 2017 at 12:19:40PM -0300, Arnaldo Carvalho de Melo wrote: > > SNIP > > > > --- > > > tools/perf/ui/hist.c | 25 +++-- > > > 1 file changed, 15 insertions(+), 10 deletions(-) > > > > > > diff --git a

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-10 Thread Jiri Olsa
On Tue, Apr 04, 2017 at 12:19:40PM -0300, Arnaldo Carvalho de Melo wrote: SNIP > > --- > > tools/perf/ui/hist.c | 25 +++-- > > 1 file changed, 15 insertions(+), 10 deletions(-) > > > > diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c > > index 5d632dc..f94b301 10064

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-09 Thread Du, Changbin
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 wrote: > > > Em Wed, Apr 05, 2017 at 12:34:59AM +0900, Namhyung Kim escreveu: > > > > Hi Arnaldo, > > > >

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-09 Thread Jiri Olsa
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 wrote: > > Em Wed, Apr 05, 2017 at 12:34:59AM +0900, Namhyung Kim escreveu: > > > Hi Arnaldo, > > > > > > On Wed, Apr 5, 2017 at 12:19 AM, Arnaldo Carvalho de Melo > >

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-04 Thread Du, Changbin
On Tue, Apr 04, 2017 at 12:51:03PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Apr 05, 2017 at 12:34:59AM +0900, Namhyung Kim escreveu: > > Hi Arnaldo, > > > > 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...@int

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-04 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 05, 2017 at 12:34:59AM +0900, Namhyung Kim escreveu: > Hi Arnaldo, > > 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...@intel.com escreveu: > >> From: Changbin Du > >> > >> Some perf_hpp_fmt both registered a

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-04 Thread Namhyung Kim
Hi Arnaldo, 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...@intel.com escreveu: >> From: Changbin Du >> >> Some perf_hpp_fmt both registered at field and sort list. For such >> instance, we only can free it when removed fro

Re: [PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-04-04 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 27, 2017 at 02:22:55PM +0800, changbin...@intel.com escreveu: > From: Changbin Du > > Some perf_hpp_fmt both registered at field and sort list. For such > instance, we only can free it when removed from the both lists. This > function currently only used by self-test code, but still s

[PATCH v2] perf: fix double free at function perf_hpp__reset_output_field

2017-03-26 Thread changbin . du
From: Changbin Du Some perf_hpp_fmt both registered at field and sort list. For such 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. Signed-off-by: Changbin Du --- v2: removed redundant Signed-off. --