[mmotm:master 159/293] mm/page_alloc.c:3546:15: warning: 'alloc_flags' may be used uninitialized in this function

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

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   fa78008f505569e7988ed3eb737ca7d43d87eac3
commit: 6f387b30fdba17b62b7c13d67d3caebbcc3bef0c [159/293] mm: consolidate GFP_NOFAIL checks in the allocator slowpath
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 6f387b30fdba17b62b7c13d67d3caebbcc3bef0c
        # 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 >>):

   mm/page_alloc.c: In function '__alloc_pages_slowpath':
>> mm/page_alloc.c:3546:15: warning: 'alloc_flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
     unsigned int alloc_flags;
                  ^~~~~~~~~~~

vim +/alloc_flags +3546 mm/page_alloc.c

ede377137 Michal Hocko    2016-05-20  3530  			else
ede377137 Michal Hocko    2016-05-20  3531  				cond_resched();
ede377137 Michal Hocko    2016-05-20  3532  
0a0337e0d Michal Hocko    2016-05-20  3533  			return true;
0a0337e0d Michal Hocko    2016-05-20  3534  		}
0a0337e0d Michal Hocko    2016-05-20  3535  	}
0a0337e0d Michal Hocko    2016-05-20  3536  
0a0337e0d Michal Hocko    2016-05-20  3537  	return false;
0a0337e0d Michal Hocko    2016-05-20  3538  }
0a0337e0d Michal Hocko    2016-05-20  3539  
11e33f6a5 Mel Gorman      2009-06-16  3540  static inline struct page *
11e33f6a5 Mel Gorman      2009-06-16  3541  __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
a9263751e Vlastimil Babka 2015-02-11  3542  						struct alloc_context *ac)
11e33f6a5 Mel Gorman      2009-06-16  3543  {
d0164adc8 Mel Gorman      2015-11-06  3544  	bool can_direct_reclaim = gfp_mask & __GFP_DIRECT_RECLAIM;
11e33f6a5 Mel Gorman      2009-06-16  3545  	struct page *page = NULL;
c603844bd Mel Gorman      2016-05-19 @3546  	unsigned int alloc_flags;
11e33f6a5 Mel Gorman      2009-06-16  3547  	unsigned long did_some_progress;
ca01798b3 Vlastimil Babka 2017-01-21  3548  	enum compact_priority compact_priority;
c5d01d0d1 Michal Hocko    2016-05-20  3549  	enum compact_result compact_result;
ca01798b3 Vlastimil Babka 2017-01-21  3550  	int compaction_retries;
ca01798b3 Vlastimil Babka 2017-01-21  3551  	int no_progress_loops;
63f53dea0 Michal Hocko    2016-10-07  3552  	unsigned long alloc_start = jiffies;
63f53dea0 Michal Hocko    2016-10-07  3553  	unsigned int stall_timeout = 10 * HZ;
ca01798b3 Vlastimil Babka 2017-01-21  3554  	unsigned int cpuset_mems_cookie;

:::::: The code at line 3546 was first introduced by commit
:::::: c603844bdcb5238980de8d58b393f52d7729d651 mm, page_alloc: convert alloc_flags to unsigned

:::::: TO: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux