Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chao Yu <chao@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [chao:syzbot 1/3] fs/f2fs/node.c:1547:2: warning: unannotated fall-through between switch labels
Date: Sun, 17 May 2026 19:52:28 +0800	[thread overview]
Message-ID: <202605171912.Ut2cGFbM-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git syzbot
head:   3b3d051f95864723dc7fa367cfbc5dfe0d9aebbd
commit: 9c3ac1a797091fc57e09e688187a34f4b3fba0dd [1/3] f2fs: fix to do sanity check on f2fs_get_node_folio_ra()
config: hexagon-randconfig-002-20260517 (https://download.01.org/0day-ci/archive/20260517/202605171912.Ut2cGFbM-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260517/202605171912.Ut2cGFbM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605171912.Ut2cGFbM-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/f2fs/node.c:1547:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    1547 |         default:
         |         ^
   fs/f2fs/node.c:1547:2: note: insert 'break;' to avoid fall-through
    1547 |         default:
         |         ^
         |         break; 
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MFD_STMFX
   Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
   Selected by [y]:
   - PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && HAS_IOMEM [=y]


vim +1547 fs/f2fs/node.c

e05df3b115e730 Jaegeuk Kim             2012-11-02  1514  
50ac3ecd8e05b6 Chao Yu                 2026-01-12  1515  int f2fs_sanity_check_node_footer(struct f2fs_sb_info *sbi,
f24f7f8cd6e8ff Matthew Wilcox (Oracle  2025-03-31  1516) 					struct folio *folio, pgoff_t nid,
50ac3ecd8e05b6 Chao Yu                 2026-01-12  1517  					enum node_type ntype, bool in_irq)
1cf6b5670af1f4 Chao Yu                 2025-03-05  1518  {
93ffb6c28ff180 Chao Yu                 2026-01-12  1519  	bool is_inode, is_xnode;
93ffb6c28ff180 Chao Yu                 2026-01-12  1520  
c18ecd99e0c707 Chao Yu                 2025-08-23  1521  	if (unlikely(nid != nid_of_node(folio)))
c18ecd99e0c707 Chao Yu                 2025-08-23  1522  		goto out_err;
c18ecd99e0c707 Chao Yu                 2025-08-23  1523  
93ffb6c28ff180 Chao Yu                 2026-01-12  1524  	is_inode = IS_INODE(folio);
93ffb6c28ff180 Chao Yu                 2026-01-12  1525  	is_xnode = f2fs_has_xattr_block(ofs_of_node(folio));
93ffb6c28ff180 Chao Yu                 2026-01-12  1526  
c18ecd99e0c707 Chao Yu                 2025-08-23  1527  	switch (ntype) {
93ffb6c28ff180 Chao Yu                 2026-01-12  1528  	case NODE_TYPE_REGULAR:
93ffb6c28ff180 Chao Yu                 2026-01-12  1529  		if (is_inode && is_xnode)
93ffb6c28ff180 Chao Yu                 2026-01-12  1530  			goto out_err;
93ffb6c28ff180 Chao Yu                 2026-01-12  1531  		break;
c18ecd99e0c707 Chao Yu                 2025-08-23  1532  	case NODE_TYPE_INODE:
93ffb6c28ff180 Chao Yu                 2026-01-12  1533  		if (!is_inode || is_xnode)
c18ecd99e0c707 Chao Yu                 2025-08-23  1534  			goto out_err;
c18ecd99e0c707 Chao Yu                 2025-08-23  1535  		break;
c18ecd99e0c707 Chao Yu                 2025-08-23  1536  	case NODE_TYPE_XATTR:
93ffb6c28ff180 Chao Yu                 2026-01-12  1537  		if (is_inode || !is_xnode)
c18ecd99e0c707 Chao Yu                 2025-08-23  1538  			goto out_err;
c18ecd99e0c707 Chao Yu                 2025-08-23  1539  		break;
c18ecd99e0c707 Chao Yu                 2025-08-23  1540  	case NODE_TYPE_NON_INODE:
93ffb6c28ff180 Chao Yu                 2026-01-12  1541  		if (is_inode)
c18ecd99e0c707 Chao Yu                 2025-08-23  1542  			goto out_err;
c18ecd99e0c707 Chao Yu                 2025-08-23  1543  		break;
9c3ac1a797091f Chao Yu                 2026-05-10  1544  	case NODE_TYPE_NON_IXNODE:
9c3ac1a797091f Chao Yu                 2026-05-10  1545  		if (is_inode || is_xnode)
9c3ac1a797091f Chao Yu                 2026-05-10  1546  			goto out_err;
c18ecd99e0c707 Chao Yu                 2025-08-23 @1547  	default:
c18ecd99e0c707 Chao Yu                 2025-08-23  1548  		break;
c18ecd99e0c707 Chao Yu                 2025-08-23  1549  	}
c18ecd99e0c707 Chao Yu                 2025-08-23  1550  	if (time_to_inject(sbi, FAULT_INCONSISTENT_FOOTER))
c18ecd99e0c707 Chao Yu                 2025-08-23  1551  		goto out_err;
c18ecd99e0c707 Chao Yu                 2025-08-23  1552  	return 0;
c18ecd99e0c707 Chao Yu                 2025-08-23  1553  out_err:
50ac3ecd8e05b6 Chao Yu                 2026-01-12  1554  	set_sbi_flag(sbi, SBI_NEED_FSCK);
50ac3ecd8e05b6 Chao Yu                 2026-01-12  1555  	f2fs_warn_ratelimited(sbi, "inconsistent node block, node_type:%d, nid:%lu, "
1cf6b5670af1f4 Chao Yu                 2025-03-05  1556  		"node_footer[nid:%u,ino:%u,ofs:%u,cpver:%llu,blkaddr:%u]",
a63f2de2dd950a Matthew Wilcox (Oracle  2025-07-08  1557) 		ntype, nid, nid_of_node(folio), ino_of_node(folio),
6d3a7f6589fec2 Matthew Wilcox (Oracle  2025-07-08  1558) 		ofs_of_node(folio), cpver_of_node(folio),
f24f7f8cd6e8ff Matthew Wilcox (Oracle  2025-03-31  1559) 		next_blkaddr_of_node(folio));
50ac3ecd8e05b6 Chao Yu                 2026-01-12  1560  
1cf6b5670af1f4 Chao Yu                 2025-03-05  1561  	f2fs_handle_error(sbi, ERROR_INCONSISTENT_FOOTER);
1cf6b5670af1f4 Chao Yu                 2025-03-05  1562  	return -EFSCORRUPTED;
1cf6b5670af1f4 Chao Yu                 2025-03-05  1563  }
1cf6b5670af1f4 Chao Yu                 2025-03-05  1564  

:::::: The code at line 1547 was first introduced by commit
:::::: c18ecd99e0c707ef8f83cace861cbc3162f4fdf1 f2fs: fix to do sanity check on node footer for non inode dnode

:::::: TO: Chao Yu <chao@kernel.org>
:::::: CC: Jaegeuk Kim <jaegeuk@kernel.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-05-17 11:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202605171912.Ut2cGFbM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chao@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox