From: kbuild test robot <lkp@intel.com>
To: Sandeep Patil <sspatil@android.com>
Cc: kbuild-all@01.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Joel Fernandes (Google)" <joel@joelfernandes.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-stable-rc:linux-4.14.y 9470/9484] fs/proc/task_mmu.c:761:7: warning: 'last_vma' may be used uninitialized in this function
Date: Tue, 19 Feb 2019 04:01:46 +0800 [thread overview]
Message-ID: <201902190440.gctrp6gs%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3651 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head: fea4e6b46436daf1982a367f638e3f5e0ae1bd3f
commit: 7c0e08d8ed3b8b6cf287007968d130f737256438 [9470/9484] mm: proc: smaps_rollup: fix pss_locked calculation
config: i386-randconfig-s1-02172359 (attached as .config)
compiler: gcc-6 (Debian 6.5.0-2) 6.5.0 20181026
reproduce:
git checkout 7c0e08d8ed3b8b6cf287007968d130f737256438
# save the attached .config to linux build tree
make ARCH=i386
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
fs/proc/task_mmu.c: In function 'show_smap.isra.38':
>> fs/proc/task_mmu.c:761:7: warning: 'last_vma' may be used uninitialized in this function [-Wmaybe-uninitialized]
bool last_vma;
^~~~~~~~
vim +/last_vma +761 fs/proc/task_mmu.c
c1192f842 Dave Hansen 2016-02-12 745
b76437579 Siddhesh Poyarekar 2012-03-21 746 static int show_smap(struct seq_file *m, void *v, int is_pid)
e070ad49f Mauricio Lin 2005-09-03 747 {
493b0e9d9 Daniel Colascione 2017-09-06 748 struct proc_maps_private *priv = m->private;
e070ad49f Mauricio Lin 2005-09-03 749 struct vm_area_struct *vma = v;
493b0e9d9 Daniel Colascione 2017-09-06 750 struct mem_size_stats mss_stack;
493b0e9d9 Daniel Colascione 2017-09-06 751 struct mem_size_stats *mss;
2165009bd Dave Hansen 2008-06-12 752 struct mm_walk smaps_walk = {
2165009bd Dave Hansen 2008-06-12 753 .pmd_entry = smaps_pte_range,
25ee01a2f Naoya Horiguchi 2015-11-05 754 #ifdef CONFIG_HUGETLB_PAGE
25ee01a2f Naoya Horiguchi 2015-11-05 755 .hugetlb_entry = smaps_hugetlb_range,
25ee01a2f Naoya Horiguchi 2015-11-05 756 #endif
2165009bd Dave Hansen 2008-06-12 757 .mm = vma->vm_mm,
2165009bd Dave Hansen 2008-06-12 758 };
493b0e9d9 Daniel Colascione 2017-09-06 759 int ret = 0;
493b0e9d9 Daniel Colascione 2017-09-06 760 bool rollup_mode;
493b0e9d9 Daniel Colascione 2017-09-06 @761 bool last_vma;
493b0e9d9 Daniel Colascione 2017-09-06 762
493b0e9d9 Daniel Colascione 2017-09-06 763 if (priv->rollup) {
493b0e9d9 Daniel Colascione 2017-09-06 764 rollup_mode = true;
493b0e9d9 Daniel Colascione 2017-09-06 765 mss = priv->rollup;
493b0e9d9 Daniel Colascione 2017-09-06 766 if (mss->first) {
493b0e9d9 Daniel Colascione 2017-09-06 767 mss->first_vma_start = vma->vm_start;
493b0e9d9 Daniel Colascione 2017-09-06 768 mss->first = false;
493b0e9d9 Daniel Colascione 2017-09-06 769 }
493b0e9d9 Daniel Colascione 2017-09-06 770 last_vma = !m_next_vma(priv, vma);
493b0e9d9 Daniel Colascione 2017-09-06 771 } else {
493b0e9d9 Daniel Colascione 2017-09-06 772 rollup_mode = false;
493b0e9d9 Daniel Colascione 2017-09-06 773 memset(&mss_stack, 0, sizeof(mss_stack));
493b0e9d9 Daniel Colascione 2017-09-06 774 mss = &mss_stack;
493b0e9d9 Daniel Colascione 2017-09-06 775 }
e070ad49f Mauricio Lin 2005-09-03 776
493b0e9d9 Daniel Colascione 2017-09-06 777 smaps_walk.private = mss;
c261e7d94 Vlastimil Babka 2016-01-14 778
:::::: The code at line 761 was first introduced by commit
:::::: 493b0e9d945fa9dfe96be93ae41b4ca4b6fdb317 mm: add /proc/pid/smaps_rollup
:::::: TO: Daniel Colascione <dancol@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29976 bytes --]
next reply other threads:[~2019-02-18 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-18 20:01 kbuild test robot [this message]
2019-02-19 14:18 ` Vlastimil Babka
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=201902190440.gctrp6gs%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=joel@joelfernandes.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=sspatil@android.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox