[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202105181127.lm1mDJHD-lkp@intel.com>
Date: Tue, 18 May 2021 11:50:31 +0800
From: kernel test robot <lkp@...el.com>
To: Christoph Hellwig <hch@....de>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: drivers/md/dm-log-writes.c:452:12: warning: stack frame size of 1184
bytes in function 'log_writes_kthread'
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 309dca309fc39a9e3c31b916393b74bd174fd74e block: store a block_device pointer in struct bio
date: 4 months ago
config: powerpc64-randconfig-r011-20210518 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0a34ff8bcb1df16fe7d643ccbe4567b2162c5024)
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=309dca309fc39a9e3c31b916393b74bd174fd74e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 309dca309fc39a9e3c31b916393b74bd174fd74e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 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 >>):
>> drivers/md/dm-log-writes.c:452:12: warning: stack frame size of 1184 bytes in function 'log_writes_kthread' [-Wframe-larger-than=]
static int log_writes_kthread(void *arg)
^
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NETDEVICES
Depends on NET
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for ETHERNET
Depends on NETDEVICES && NET
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for MMC_SDHCI
Depends on MMC && HAS_DMA
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for MMC_SDHCI_PLTFM
Depends on MMC && MMC_SDHCI
Selected by
- AKEBONO && PPC_47x
vim +/log_writes_kthread +452 drivers/md/dm-log-writes.c
0e9cebe724597a Josef Bacik 2015-03-20 451
0e9cebe724597a Josef Bacik 2015-03-20 @452 static int log_writes_kthread(void *arg)
0e9cebe724597a Josef Bacik 2015-03-20 453 {
0e9cebe724597a Josef Bacik 2015-03-20 454 struct log_writes_c *lc = (struct log_writes_c *)arg;
0e9cebe724597a Josef Bacik 2015-03-20 455 sector_t sector = 0;
0e9cebe724597a Josef Bacik 2015-03-20 456
0e9cebe724597a Josef Bacik 2015-03-20 457 while (!kthread_should_stop()) {
0e9cebe724597a Josef Bacik 2015-03-20 458 bool super = false;
0e9cebe724597a Josef Bacik 2015-03-20 459 bool logging_enabled;
0e9cebe724597a Josef Bacik 2015-03-20 460 struct pending_block *block = NULL;
0e9cebe724597a Josef Bacik 2015-03-20 461 int ret;
0e9cebe724597a Josef Bacik 2015-03-20 462
0e9cebe724597a Josef Bacik 2015-03-20 463 spin_lock_irq(&lc->blocks_lock);
0e9cebe724597a Josef Bacik 2015-03-20 464 if (!list_empty(&lc->logging_blocks)) {
0e9cebe724597a Josef Bacik 2015-03-20 465 block = list_first_entry(&lc->logging_blocks,
0e9cebe724597a Josef Bacik 2015-03-20 466 struct pending_block, list);
0e9cebe724597a Josef Bacik 2015-03-20 467 list_del_init(&block->list);
0e9cebe724597a Josef Bacik 2015-03-20 468 if (!lc->logging_enabled)
0e9cebe724597a Josef Bacik 2015-03-20 469 goto next;
0e9cebe724597a Josef Bacik 2015-03-20 470
0e9cebe724597a Josef Bacik 2015-03-20 471 sector = lc->next_sector;
228bb5b26038a7 Josef Bacik 2017-07-28 472 if (!(block->flags & LOG_DISCARD_FLAG))
228bb5b26038a7 Josef Bacik 2017-07-28 473 lc->next_sector += dev_to_bio_sectors(lc, block->nr_sectors);
228bb5b26038a7 Josef Bacik 2017-07-28 474 lc->next_sector += dev_to_bio_sectors(lc, 1);
0e9cebe724597a Josef Bacik 2015-03-20 475
0e9cebe724597a Josef Bacik 2015-03-20 476 /*
0e9cebe724597a Josef Bacik 2015-03-20 477 * Apparently the size of the device may not be known
0e9cebe724597a Josef Bacik 2015-03-20 478 * right away, so handle this properly.
0e9cebe724597a Josef Bacik 2015-03-20 479 */
0e9cebe724597a Josef Bacik 2015-03-20 480 if (!lc->end_sector)
0e9cebe724597a Josef Bacik 2015-03-20 481 lc->end_sector = logdev_last_sector(lc);
0e9cebe724597a Josef Bacik 2015-03-20 482 if (lc->end_sector &&
0e9cebe724597a Josef Bacik 2015-03-20 483 lc->next_sector >= lc->end_sector) {
0e9cebe724597a Josef Bacik 2015-03-20 484 DMERR("Ran out of space on the logdev");
0e9cebe724597a Josef Bacik 2015-03-20 485 lc->logging_enabled = false;
0e9cebe724597a Josef Bacik 2015-03-20 486 goto next;
0e9cebe724597a Josef Bacik 2015-03-20 487 }
0e9cebe724597a Josef Bacik 2015-03-20 488 lc->logged_entries++;
0e9cebe724597a Josef Bacik 2015-03-20 489 atomic_inc(&lc->io_blocks);
0e9cebe724597a Josef Bacik 2015-03-20 490
0e9cebe724597a Josef Bacik 2015-03-20 491 super = (block->flags & (LOG_FUA_FLAG | LOG_MARK_FLAG));
0e9cebe724597a Josef Bacik 2015-03-20 492 if (super)
0e9cebe724597a Josef Bacik 2015-03-20 493 atomic_inc(&lc->io_blocks);
0e9cebe724597a Josef Bacik 2015-03-20 494 }
0e9cebe724597a Josef Bacik 2015-03-20 495 next:
0e9cebe724597a Josef Bacik 2015-03-20 496 logging_enabled = lc->logging_enabled;
0e9cebe724597a Josef Bacik 2015-03-20 497 spin_unlock_irq(&lc->blocks_lock);
0e9cebe724597a Josef Bacik 2015-03-20 498 if (block) {
0e9cebe724597a Josef Bacik 2015-03-20 499 if (logging_enabled) {
0e9cebe724597a Josef Bacik 2015-03-20 500 ret = log_one_block(lc, block, sector);
0e9cebe724597a Josef Bacik 2015-03-20 501 if (!ret && super)
0e9cebe724597a Josef Bacik 2015-03-20 502 ret = log_super(lc);
0e9cebe724597a Josef Bacik 2015-03-20 503 if (ret) {
0e9cebe724597a Josef Bacik 2015-03-20 504 spin_lock_irq(&lc->blocks_lock);
0e9cebe724597a Josef Bacik 2015-03-20 505 lc->logging_enabled = false;
0e9cebe724597a Josef Bacik 2015-03-20 506 spin_unlock_irq(&lc->blocks_lock);
0e9cebe724597a Josef Bacik 2015-03-20 507 }
0e9cebe724597a Josef Bacik 2015-03-20 508 } else
0e9cebe724597a Josef Bacik 2015-03-20 509 free_pending_block(lc, block);
0e9cebe724597a Josef Bacik 2015-03-20 510 continue;
0e9cebe724597a Josef Bacik 2015-03-20 511 }
0e9cebe724597a Josef Bacik 2015-03-20 512
0e9cebe724597a Josef Bacik 2015-03-20 513 if (!try_to_freeze()) {
0e9cebe724597a Josef Bacik 2015-03-20 514 set_current_state(TASK_INTERRUPTIBLE);
0e9cebe724597a Josef Bacik 2015-03-20 515 if (!kthread_should_stop() &&
0c79c62021d23f Josef Bacik 2017-07-28 516 list_empty(&lc->logging_blocks))
0e9cebe724597a Josef Bacik 2015-03-20 517 schedule();
0e9cebe724597a Josef Bacik 2015-03-20 518 __set_current_state(TASK_RUNNING);
0e9cebe724597a Josef Bacik 2015-03-20 519 }
0e9cebe724597a Josef Bacik 2015-03-20 520 }
0e9cebe724597a Josef Bacik 2015-03-20 521 return 0;
0e9cebe724597a Josef Bacik 2015-03-20 522 }
0e9cebe724597a Josef Bacik 2015-03-20 523
:::::: The code at line 452 was first introduced by commit
:::::: 0e9cebe724597a76ab1b0ebc0a21e16f7db11b47 dm: add log writes target
:::::: TO: Josef Bacik <jbacik@...com>
:::::: CC: Mike Snitzer <snitzer@...hat.com>
---
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" (22167 bytes)
Powered by blists - more mailing lists