fs/ntfs3/fsntfs.c:770:5: warning: stack frame size (2112) exceeds limit (1024) in 'ntfs_clear_mft_tail'

From: kernel test robot
Date: Fri Nov 05 2021 - 21:12:21 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe91c4725aeed35023ba4f7a1e1adfebb6878c23
commit: 6e5be40d32fb1907285277c02e74493ed43d77fe fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile
date: 3 months ago
config: hexagon-randconfig-r024-20211010 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6e5be40d32fb1907285277c02e74493ed43d77fe
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6e5be40d32fb1907285277c02e74493ed43d77fe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

fs/ntfs3/fsntfs.c:1874:9: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
size_t cnt, off;
^
>> fs/ntfs3/fsntfs.c:770:5: warning: stack frame size (2112) exceeds limit (1024) in 'ntfs_clear_mft_tail' [-Wframe-larger-than]
int ntfs_clear_mft_tail(struct ntfs_sb_info *sbi, size_t from, size_t to)
^
2 warnings generated.


vim +/ntfs_clear_mft_tail +770 fs/ntfs3/fsntfs.c

82cae269cfa9530 Konstantin Komarov 2021-08-13 763
82cae269cfa9530 Konstantin Komarov 2021-08-13 764 /*
82cae269cfa9530 Konstantin Komarov 2021-08-13 765 * ntfs_clear_mft_tail
82cae269cfa9530 Konstantin Komarov 2021-08-13 766 *
82cae269cfa9530 Konstantin Komarov 2021-08-13 767 * formats empty records [from, to)
82cae269cfa9530 Konstantin Komarov 2021-08-13 768 * sbi->mft.bitmap is locked for write
82cae269cfa9530 Konstantin Komarov 2021-08-13 769 */
82cae269cfa9530 Konstantin Komarov 2021-08-13 @770 int ntfs_clear_mft_tail(struct ntfs_sb_info *sbi, size_t from, size_t to)
82cae269cfa9530 Konstantin Komarov 2021-08-13 771 {
82cae269cfa9530 Konstantin Komarov 2021-08-13 772 int err;
82cae269cfa9530 Konstantin Komarov 2021-08-13 773 u32 rs;
82cae269cfa9530 Konstantin Komarov 2021-08-13 774 u64 vbo;
82cae269cfa9530 Konstantin Komarov 2021-08-13 775 struct runs_tree *run;
82cae269cfa9530 Konstantin Komarov 2021-08-13 776 struct ntfs_inode *ni;
82cae269cfa9530 Konstantin Komarov 2021-08-13 777
82cae269cfa9530 Konstantin Komarov 2021-08-13 778 if (from >= to)
82cae269cfa9530 Konstantin Komarov 2021-08-13 779 return 0;
82cae269cfa9530 Konstantin Komarov 2021-08-13 780
82cae269cfa9530 Konstantin Komarov 2021-08-13 781 rs = sbi->record_size;
82cae269cfa9530 Konstantin Komarov 2021-08-13 782 ni = sbi->mft.ni;
82cae269cfa9530 Konstantin Komarov 2021-08-13 783 run = &ni->file.run;
82cae269cfa9530 Konstantin Komarov 2021-08-13 784
82cae269cfa9530 Konstantin Komarov 2021-08-13 785 down_read(&ni->file.run_lock);
82cae269cfa9530 Konstantin Komarov 2021-08-13 786 vbo = (u64)from * rs;
82cae269cfa9530 Konstantin Komarov 2021-08-13 787 for (; from < to; from++, vbo += rs) {
82cae269cfa9530 Konstantin Komarov 2021-08-13 788 struct ntfs_buffers nb;
82cae269cfa9530 Konstantin Komarov 2021-08-13 789
82cae269cfa9530 Konstantin Komarov 2021-08-13 790 err = ntfs_get_bh(sbi, run, vbo, rs, &nb);
82cae269cfa9530 Konstantin Komarov 2021-08-13 791 if (err)
82cae269cfa9530 Konstantin Komarov 2021-08-13 792 goto out;
82cae269cfa9530 Konstantin Komarov 2021-08-13 793
82cae269cfa9530 Konstantin Komarov 2021-08-13 794 err = ntfs_write_bh(sbi, &sbi->new_rec->rhdr, &nb, 0);
82cae269cfa9530 Konstantin Komarov 2021-08-13 795 nb_put(&nb);
82cae269cfa9530 Konstantin Komarov 2021-08-13 796 if (err)
82cae269cfa9530 Konstantin Komarov 2021-08-13 797 goto out;
82cae269cfa9530 Konstantin Komarov 2021-08-13 798 }
82cae269cfa9530 Konstantin Komarov 2021-08-13 799
82cae269cfa9530 Konstantin Komarov 2021-08-13 800 out:
82cae269cfa9530 Konstantin Komarov 2021-08-13 801 sbi->mft.used = from;
82cae269cfa9530 Konstantin Komarov 2021-08-13 802 up_read(&ni->file.run_lock);
82cae269cfa9530 Konstantin Komarov 2021-08-13 803 return err;
82cae269cfa9530 Konstantin Komarov 2021-08-13 804 }
82cae269cfa9530 Konstantin Komarov 2021-08-13 805

:::::: The code at line 770 was first introduced by commit
:::::: 82cae269cfa953032fbb8980a7d554d60fb00b17 fs/ntfs3: Add initialization of super block

:::::: TO: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx>
:::::: CC: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip