All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: perf/x86/intel: Fix LBR callstack issue caused by FREEZE_LBRS_ON_PMI
Date: Mon, 14 Sep 2015 20:43:27 +0000	[thread overview]
Message-ID: <20150914204327.GA11902@mwanda> (raw)

Hello Kan Liang,

This is a semi-automatic email about new static checker warnings.

The patch deb27519bf1f: "perf/x86/intel: Fix LBR callstack issue 
caused by FREEZE_LBRS_ON_PMI" from Aug 17, 2015, leads to the 
following Smatch complaint:

arch/x86/kernel/cpu/perf_event_intel_lbr.c:155 __intel_pmu_lbr_enable()
	 warn: variable dereferenced before check 'cpuc->lbr_sel' (see line 154)

arch/x86/kernel/cpu/perf_event_intel_lbr.c
   153		 */
   154		lbr_select = cpuc->lbr_sel->config;
                             ^^^^^^^^^^^^^^^^^^^^^
New unchecked dereference.

   155		if (cpuc->lbr_sel && !pmi)
                    ^^^^^^^^^^^^^
Old code assumes it can be NULL.

   156			wrmsrl(MSR_LBR_SELECT, lbr_select);
   157	

regards,
dan carpenter

             reply	other threads:[~2015-09-14 20:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 20:43 Dan Carpenter [this message]
2015-09-14 21:03 ` perf/x86/intel: Fix LBR callstack issue caused by FREEZE_LBRS_ON_PMI Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150914204327.GA11902@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.