* [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
@ 2019-02-18 20:01 kbuild test robot
2019-02-19 14:18 ` Vlastimil Babka
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-02-18 20:01 UTC (permalink / raw)
To: Sandeep Patil
Cc: kbuild-all, Greg Kroah-Hartman, Joel Fernandes (Google),
Andrew Morton, Linux Memory Management List
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [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
2019-02-18 20:01 [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 kbuild test robot
@ 2019-02-19 14:18 ` Vlastimil Babka
0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2019-02-19 14:18 UTC (permalink / raw)
To: kbuild test robot, Sandeep Patil
Cc: kbuild-all, Greg Kroah-Hartman, Joel Fernandes (Google),
Andrew Morton, Linux Memory Management List
On 2/18/19 9:01 PM, kbuild test robot wrote:
> 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;
> ^~~~~~~~
AFAICS false positive, and the commit in question doesn't touch that part.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-19 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 20:01 [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 kbuild test robot
2019-02-19 14:18 ` Vlastimil Babka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).