1. 30 7月, 2019 1 次提交
  2. 09 7月, 2019 2 次提交
    • L
      perf intel-pt: Fix potential NULL pointer dereference found by the smatch tool · 323fd749
      Leo Yan 提交于
      Based on the following report from Smatch, fix the potential NULL
      pointer dereference check.
      
        tools/perf/util/intel-pt.c:3200
        intel_pt_process_auxtrace_info() error: we previously assumed
        'session->itrace_synth_opts' could be null (see line 3196)
      
        tools/perf/util/intel-pt.c:3206
        intel_pt_process_auxtrace_info() warn: variable dereferenced before
        check 'session->itrace_synth_opts' (see line 3200)
      
        tools/perf/util/intel-pt.c
        3196         if (session->itrace_synth_opts && session->itrace_synth_opts->set) {
        3197                 pt->synth_opts = *session->itrace_synth_opts;
        3198         } else {
        3199                 itrace_synth_opts__set_default(&pt->synth_opts,
        3200                                 session->itrace_synth_opts->default_no_sample);
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
        3201                 if (!session->itrace_synth_opts->default_no_sample &&
        3202                     !session->itrace_synth_opts->inject) {
        3203                         pt->synth_opts.branches = false;
        3204                         pt->synth_opts.callchain = true;
        3205                 }
        3206                 if (session->itrace_synth_opts)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        3207                         pt->synth_opts.thread_stack =
        3208                                 session->itrace_synth_opts->thread_stack;
        3209         }
      
      'session->itrace_synth_opts' is impossible to be a NULL pointer in
      intel_pt_process_auxtrace_info(), thus this patch removes the NULL test
      for 'session->itrace_synth_opts'.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/20190708143937.7722-4-leo.yan@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      323fd749
    • A
      tools lib: Adopt zalloc()/zfree() from tools/perf · 7f7c536f
      Arnaldo Carvalho de Melo 提交于
      Eroding a bit more the tools/perf/util/util.h hodpodge header.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-natazosyn9rwjka25tvcnyi0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7f7c536f
  3. 25 6月, 2019 1 次提交
  4. 18 6月, 2019 9 次提交
  5. 11 6月, 2019 3 次提交
  6. 05 6月, 2019 2 次提交
  7. 29 5月, 2019 3 次提交
  8. 02 3月, 2019 1 次提交
  9. 06 2月, 2019 1 次提交
  10. 02 1月, 2019 1 次提交
  11. 06 11月, 2018 1 次提交
  12. 31 10月, 2018 2 次提交
  13. 25 10月, 2018 1 次提交
  14. 21 9月, 2018 1 次提交
  15. 06 6月, 2018 2 次提交
  16. 27 4月, 2018 3 次提交
  17. 08 3月, 2018 6 次提交