[lkml]   [2013]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 11/11] perf: Avoid uninitialized sample type reference in __perf_event__output_id_sample
On Mon, Sep 30, 2013 at 01:29:12PM -0700, Andi Kleen wrote:
> From: Andi Kleen <>
> __perf_event__output_id_sample looks at data->type to decide
> what to output.
> A lot of of the custom output functions, for example perf_log_throttle
> start with perf_event_header__init_id, which only initializes
> the header when event->attr.sample_id_all is true.
> But when this is false the output function is still called,
> and will look at an uninitialized header.
> I changed all the callers to perf_event_header__init_id
> to __perf_event_header__init_id which unconditionally
> initializes the header.
> FWIW I'm not fully sure this is the correct fix and what the
> exact semantics of sample_id_all are supposed to be.
> Should it disable all throttling etc. messages?
> Please review carefully.

Why are you doing this; also what's up with 11/11?

 \ /
  Last update: 2013-10-02 11:21    [W:0.249 / U:3.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site