[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103231739.YRe0w1Lp-lkp@intel.com>
Date: Tue, 23 Mar 2021 17:52:47 +0800
From: kernel test robot <lkp@...el.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>
Subject: fs/buffer.c:2259:5: warning: stack frame size of 2144 bytes in
function 'block_read_full_page'
Hi Christophe,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 84196390620ac0e5070ae36af84c137c6216a7dc
commit: 4eeef098b43242ed145c83fba9989d586d707589 powerpc/44x: Remove STDBINUTILS kconfig option
date: 7 weeks ago
config: powerpc64-randconfig-r036-20210322 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 14696baaf4c43fe53f738bc292bbe169eed93d5d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4eeef098b43242ed145c83fba9989d586d707589
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4eeef098b43242ed145c83fba9989d586d707589
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> fs/buffer.c:2259:5: warning: stack frame size of 2144 bytes in function 'block_read_full_page' [-Wframe-larger-than=]
int block_read_full_page(struct page *page, get_block_t *get_block)
^
1 warning generated.
--
>> fs/ext4/move_extent.c:247:1: warning: stack frame size of 2240 bytes in function 'move_extent_per_page' [-Wframe-larger-than=]
move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
^
1 warning generated.
--
>> fs/fat/dir.c:1133:5: warning: stack frame size of 2112 bytes in function 'fat_alloc_new_dir' [-Wframe-larger-than=]
int fat_alloc_new_dir(struct inode *dir, struct timespec64 *ts)
^
>> fs/fat/dir.c:1281:5: warning: stack frame size of 2224 bytes in function 'fat_add_entries' [-Wframe-larger-than=]
int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
^
2 warnings generated.
--
>> fs/fat/fatent.c:464:5: warning: stack frame size of 2240 bytes in function 'fat_alloc_clusters' [-Wframe-larger-than=]
int fat_alloc_clusters(struct inode *inode, int *cluster, int nr_cluster)
^
>> fs/fat/fatent.c:552:5: warning: stack frame size of 2176 bytes in function 'fat_free_clusters' [-Wframe-larger-than=]
int fat_free_clusters(struct inode *inode, int cluster)
^
2 warnings generated.
--
>> fs/ntfs/aops.c:378:12: warning: stack frame size of 2208 bytes in function 'ntfs_readpage' [-Wframe-larger-than=]
static int ntfs_readpage(struct file *file, struct page *page)
^
fs/ntfs/aops.c:899:12: warning: stack frame size of 4320 bytes in function 'ntfs_write_mst_block' [-Wframe-larger-than=]
static int ntfs_write_mst_block(struct page *page,
^
2 warnings generated.
--
>> fs/ntfs/mft.c:454:5: warning: stack frame size of 2192 bytes in function 'ntfs_sync_mft_mirror' [-Wframe-larger-than=]
int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no,
^
>> fs/ntfs/mft.c:660:5: warning: stack frame size of 2192 bytes in function 'write_mft_record_nolock' [-Wframe-larger-than=]
int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync)
^
2 warnings generated.
vim +/block_read_full_page +2259 fs/buffer.c
8ab22b9abb5c55 Hisashi Hifumi 2008-07-28 2251
^1da177e4c3f41 Linus Torvalds 2005-04-16 2252 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2253 * Generic "read page" function for block devices that have the normal
^1da177e4c3f41 Linus Torvalds 2005-04-16 2254 * get_block functionality. This is most of the block device filesystems.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2255 * Reads the page asynchronously --- the unlock_buffer() and
^1da177e4c3f41 Linus Torvalds 2005-04-16 2256 * set/clear_buffer_uptodate() functions propagate buffer state into the
^1da177e4c3f41 Linus Torvalds 2005-04-16 2257 * page struct once IO has completed.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2258 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2259 int block_read_full_page(struct page *page, get_block_t *get_block)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2260 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2261 struct inode *inode = page->mapping->host;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2262 sector_t iblock, lblock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2263 struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE];
45bce8f3e3436b Linus Torvalds 2012-11-29 2264 unsigned int blocksize, bbits;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2265 int nr, i;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2266 int fully_mapped = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2267
45bce8f3e3436b Linus Torvalds 2012-11-29 2268 head = create_page_buffers(page, inode, 0);
45bce8f3e3436b Linus Torvalds 2012-11-29 2269 blocksize = head->b_size;
45bce8f3e3436b Linus Torvalds 2012-11-29 2270 bbits = block_size_bits(blocksize);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2271
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01 2272 iblock = (sector_t)page->index << (PAGE_SHIFT - bbits);
45bce8f3e3436b Linus Torvalds 2012-11-29 2273 lblock = (i_size_read(inode)+blocksize-1) >> bbits;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2274 bh = head;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2275 nr = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2276 i = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2277
^1da177e4c3f41 Linus Torvalds 2005-04-16 2278 do {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2279 if (buffer_uptodate(bh))
^1da177e4c3f41 Linus Torvalds 2005-04-16 2280 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2281
^1da177e4c3f41 Linus Torvalds 2005-04-16 2282 if (!buffer_mapped(bh)) {
c64610ba585fab Andrew Morton 2005-05-16 2283 int err = 0;
c64610ba585fab Andrew Morton 2005-05-16 2284
^1da177e4c3f41 Linus Torvalds 2005-04-16 2285 fully_mapped = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2286 if (iblock < lblock) {
b0cf2321c65991 Badari Pulavarty 2006-03-26 2287 WARN_ON(bh->b_size != blocksize);
c64610ba585fab Andrew Morton 2005-05-16 2288 err = get_block(inode, iblock, bh, 0);
c64610ba585fab Andrew Morton 2005-05-16 2289 if (err)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2290 SetPageError(page);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2291 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2292 if (!buffer_mapped(bh)) {
eebd2aa355692a Christoph Lameter 2008-02-04 2293 zero_user(page, i * blocksize, blocksize);
c64610ba585fab Andrew Morton 2005-05-16 2294 if (!err)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2295 set_buffer_uptodate(bh);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2296 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2297 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2298 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2299 * get_block() might have updated the buffer
^1da177e4c3f41 Linus Torvalds 2005-04-16 2300 * synchronously
^1da177e4c3f41 Linus Torvalds 2005-04-16 2301 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2302 if (buffer_uptodate(bh))
^1da177e4c3f41 Linus Torvalds 2005-04-16 2303 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2304 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2305 arr[nr++] = bh;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2306 } while (i++, iblock++, (bh = bh->b_this_page) != head);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2307
^1da177e4c3f41 Linus Torvalds 2005-04-16 2308 if (fully_mapped)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2309 SetPageMappedToDisk(page);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2310
^1da177e4c3f41 Linus Torvalds 2005-04-16 2311 if (!nr) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2312 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2313 * All buffers are uptodate - we can set the page uptodate
^1da177e4c3f41 Linus Torvalds 2005-04-16 2314 * as well. But not if get_block() returned an error.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2315 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2316 if (!PageError(page))
^1da177e4c3f41 Linus Torvalds 2005-04-16 2317 SetPageUptodate(page);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2318 unlock_page(page);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2319 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2320 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2321
^1da177e4c3f41 Linus Torvalds 2005-04-16 2322 /* Stage two: lock the buffers */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2323 for (i = 0; i < nr; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2324 bh = arr[i];
^1da177e4c3f41 Linus Torvalds 2005-04-16 2325 lock_buffer(bh);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2326 mark_buffer_async_read(bh);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2327 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2328
^1da177e4c3f41 Linus Torvalds 2005-04-16 2329 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2330 * Stage 3: start the IO. Check for uptodateness
^1da177e4c3f41 Linus Torvalds 2005-04-16 2331 * inside the buffer lock in case another process reading
^1da177e4c3f41 Linus Torvalds 2005-04-16 2332 * the underlying blockdev brought it uptodate (the sct fix).
^1da177e4c3f41 Linus Torvalds 2005-04-16 2333 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2334 for (i = 0; i < nr; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2335 bh = arr[i];
^1da177e4c3f41 Linus Torvalds 2005-04-16 2336 if (buffer_uptodate(bh))
^1da177e4c3f41 Linus Torvalds 2005-04-16 2337 end_buffer_async_read(bh, 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2338 else
2a222ca992c35a Mike Christie 2016-06-05 2339 submit_bh(REQ_OP_READ, 0, bh);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2340 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2341 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2342 }
1fe72eaa0f46a0 H Hartley Sweeten 2009-09-22 2343 EXPORT_SYMBOL(block_read_full_page);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2344
:::::: The code at line 2259 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32710 bytes)
Powered by blists - more mailing lists