RE: perf/x86/intel: Fix LBR callstack issue caused by FREEZE_LBRS_ON_PMI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 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
>

Thanks.
I will send out a new patch to fix it.

Regards,
Kan

 
> regards,
> dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux