Em Mon, Aug 31, 2015 at 01:19:40PM +0200, Jiri Olsa escreveu:
> On Fri, Aug 28, 2015 at 05:48:07AM -0400, Kan Liang wrote:
> 
> SNIP
> 
> >  
> >  static struct machine *machines__find_for_cpumode(struct machines 
> > *machines,
> > @@ -1079,11 +1101,12 @@ static int machines__deliver_event(struct machines 
> > *machines,
> >  
> >     switch (event->header.type) {
> >     case PERF_RECORD_SAMPLE:
> > -           dump_sample(evsel, event, sample);
> >             if (evsel == NULL) {
> >                     ++evlist->stats.nr_unknown_id;
> >                     return 0;
> >             }
> > +           dump_sample(evsel, event, sample);
> > +
> 
> could you submit this hunk separately.. seems like we could
> segfault in dump_sample if there's evsel == NULL, right?

Right, this one should be submitted separately, if there is a test right
after we use a pointer, I wouldn't even think about reading
dump_sample() code :-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to