[cgroup:review-cgwb-4.3-fixes 5/5] mm/page-writeback.c:1908: warning: 'filepages' is used uninitialized in this function

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgwb-4.3-fixes
head:   93bcba95270132db0f16c706a784c97d3a6cc74e
commit: 93bcba95270132db0f16c706a784c97d3a6cc74e [5/5] writeback: fix incorrect calculation of available memory for memcg domains
config: avr32-allnoconfig (attached as .config)
reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 93bcba95270132db0f16c706a784c97d3a6cc74e
  # save the attached .config to linux build tree
  make.cross ARCH=avr32 

All warnings (new ones prefixed by >>):

   mm/page-writeback.c: In function 'wb_over_bg_thresh':
>> mm/page-writeback.c:1908: warning: 'filepages' is used uninitialized in this function
>> mm/page-writeback.c:1908: warning: 'headroom' is used uninitialized in this function
   mm/page-writeback.c: In function 'balance_dirty_pages_ratelimited':
   mm/page-writeback.c:1581: warning: 'writeback' is used uninitialized in this function
   mm/page-writeback.c:1573: note: 'writeback' was declared here
   mm/page-writeback.c:1582: warning: 'filepages' is used uninitialized in this function
   mm/page-writeback.c:1573: note: 'filepages' was declared here
   mm/page-writeback.c:1582: warning: 'headroom' is used uninitialized in this function
   mm/page-writeback.c:1573: note: 'headroom' was declared here
   mm/page-writeback.c:1545: warning: 'm_bg_thresh' may be used uninitialized in this function
   mm/page-writeback.c:1545: note: 'm_bg_thresh' was declared here
   mm/page-writeback.c:1545: warning: 'm_thresh' may be used uninitialized in this function
   mm/page-writeback.c:1545: note: 'm_thresh' was declared here
   mm/page-writeback.c:1545: warning: 'm_dirty' may be used uninitialized in this function
   mm/page-writeback.c:1545: note: 'm_dirty' was declared here

vim +/filepages +1908 mm/page-writeback.c

  1892		gdtc->avail = global_dirtyable_memory();
  1893		gdtc->dirty = global_page_state(NR_FILE_DIRTY) +
  1894			      global_page_state(NR_UNSTABLE_NFS);
  1895		domain_dirty_limits(gdtc);
  1896	
  1897		if (gdtc->dirty > gdtc->bg_thresh)
  1898			return true;
  1899	
  1900		if (wb_stat(wb, WB_RECLAIMABLE) > __wb_calc_thresh(gdtc))
  1901			return true;
  1902	
  1903		if (mdtc) {
  1904			unsigned long filepages, headroom, writeback;
  1905	
  1906			mem_cgroup_wb_stats(wb, &filepages, &headroom, &mdtc->dirty,
  1907					    &writeback);
> 1908			mdtc_calc_avail(mdtc, filepages, headroom);
  1909			domain_dirty_limits(mdtc);	/* ditto, ignore writeback */
  1910	
  1911			if (mdtc->dirty > mdtc->bg_thresh)
  1912				return true;
  1913	
  1914			if (wb_stat(wb, WB_RECLAIMABLE) > __wb_calc_thresh(mdtc))
  1915				return true;
  1916		}

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

Attachment: .config.gz
Description: Binary data


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

  Powered by Linux