All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [tip:x86/urgent 2/2] arch/x86/kernel/cpu/resctrl/monitor.c:310 __mon_event_count() error: uninitialized symbol 'm'.
Date: Fri, 13 Aug 2021 07:37:53 +0800	[thread overview]
Message-ID: <202108130745.xapwO2vv-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5447 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
CC: x86(a)kernel.org
TO: Babu Moger <Babu.Moger@amd.com>
CC: Borislav Petkov <bp@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent
head:   064855a69003c24bd6b473b367d364e418c57625
commit: 064855a69003c24bd6b473b367d364e418c57625 [2/2] x86/resctrl: Fix default monitoring groups reporting
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: i386-randconfig-m021-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
arch/x86/kernel/cpu/resctrl/monitor.c:310 __mon_event_count() error: uninitialized symbol 'm'.
arch/x86/kernel/cpu/resctrl/monitor.c:315 __mon_event_count() error: potentially dereferencing uninitialized 'm'.

vim +/m +310 arch/x86/kernel/cpu/resctrl/monitor.c

ba0f26d8529c2d arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2018-04-20  287  
064855a69003c2 arch/x86/kernel/cpu/resctrl/monitor.c   Babu Moger      2021-08-02  288  static u64 __mon_event_count(u32 rmid, struct rmid_read *rr)
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  289  {
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  290  	struct mbm_state *m;
ba0f26d8529c2d arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2018-04-20  291  	u64 chunks, tval;
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  292  
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  293  	tval = __rmid_read(rmid, rr->evtid);
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  294  	if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) {
064855a69003c2 arch/x86/kernel/cpu/resctrl/monitor.c   Babu Moger      2021-08-02  295  		return tval;
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  296  	}
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  297  	switch (rr->evtid) {
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  298  	case QOS_L3_OCCUP_EVENT_ID:
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  299  		rr->val += tval;
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  300  		return 0;
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  301  	case QOS_L3_MBM_TOTAL_EVENT_ID:
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  302  		m = &rr->d->mbm_total[rmid];
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  303  		break;
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  304  	case QOS_L3_MBM_LOCAL_EVENT_ID:
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  305  		m = &rr->d->mbm_local[rmid];
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  306  		break;
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  307  	}
a4de1dfdd72653 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  308  
a4de1dfdd72653 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  309  	if (rr->first) {
ba0f26d8529c2d arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2018-04-20 @310  		memset(m, 0, sizeof(struct mbm_state));
ba0f26d8529c2d arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2018-04-20  311  		m->prev_bw_msr = m->prev_msr = tval;
a4de1dfdd72653 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  312  		return 0;
a4de1dfdd72653 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  313  	}
a4de1dfdd72653 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  314  
46637d4570e108 arch/x86/kernel/cpu/resctrl/monitor.c   Reinette Chatre 2020-05-05 @315  	chunks = mbm_overflow_count(m->prev_msr, tval, rr->r->mbm_width);
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  316  	m->chunks += chunks;
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  317  	m->prev_msr = tval;
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  318  
4868a61d498af3 arch/x86/kernel/cpu/resctrl/monitor.c   Fenghua Yu      2020-10-14  319  	rr->val += get_corrected_mbm_count(rmid, m->chunks);
4868a61d498af3 arch/x86/kernel/cpu/resctrl/monitor.c   Fenghua Yu      2020-10-14  320  
9f52425ba303d9 arch/x86/kernel/cpu/intel_rdt_monitor.c Tony Luck       2017-07-25  321  	return 0;
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  322  }
d89b7379015fc5 arch/x86/kernel/cpu/intel_rdt_monitor.c Vikas Shivappa  2017-07-25  323  

:::::: The code at line 310 was first introduced by commit
:::::: ba0f26d8529c2dfc9aa6d9e8a338180737f8c1be x86/intel_rdt/mba_sc: Prepare for feedback loop

:::::: TO: Vikas Shivappa <vikas.shivappa@linux.intel.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35137 bytes --]

                 reply	other threads:[~2021-08-12 23:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202108130745.xapwO2vv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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.