[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69819885.050a0220.3b3015.0006.GAE@google.com>
Date: Mon, 02 Feb 2026 22:41:09 -0800
From: syzbot <syzbot+7de5fe447862fc37576f@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Forwarded: [PATCH] ext4: add debug logging for inline data flag in ext4_iget
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.
***
Subject: [PATCH] ext4: add debug logging for inline data flag in ext4_iget
Author: kartikey406@...il.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
Add debug printk statements to track inline data flag status and inode
size during inode loading. This helps diagnose corruption issues where
the EXT4_INLINE_DATA_FL flag may be set inconsistently with the actual
inode size.
The debug output logs:
- Raw inode mode, flags, and size fields
- Whether INLINE_DATA flag is set
- Whether EXTENTS flag is set
This is useful for investigating crashes in ext4_write_inline_data()
where the BUG_ON(pos + len > EXT4_I(inode)->i_inline_size) triggers
due to corrupted filesystem images that have inline data flag set
but file size exceeding inline capacity.
Reported-by: syzbot+7de5fe447862fc37576f@...kaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=7de5fe447862fc37576f
Signed-off-by: Deepanshu Kartikey <Kartikey406@...il.com>
---
fs/ext4/inode.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0c466ccbed69..ad6eff690edd 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5211,6 +5211,22 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
goto bad_inode;
raw_inode = ext4_raw_inode(&iloc);
+ printk(KERN_WARNING "EXT4-fs DEBUG: inode=%lu i_mode=0x%x i_flags=0x%x i_size_lo=%u i_size_hi=%u\n",
+ ino,
+ le16_to_cpu(raw_inode->i_mode),
+ le32_to_cpu(raw_inode->i_flags),
+ le32_to_cpu(raw_inode->i_size_lo),
+ le32_to_cpu(raw_inode->i_size_high));
+ /* Check if inline flag is set in raw flags */
+ if (le32_to_cpu(raw_inode->i_flags) & EXT4_INLINE_DATA_FL) {
+ printk(KERN_WARNING "EXT4-fs DEBUG: inode=%lu has INLINE_DATA flag set!\n", ino);
+ }
+
+ /* Check if extents flag is set in raw flags */
+ if (le32_to_cpu(raw_inode->i_flags) & EXT4_EXTENTS_FL) {
+ printk(KERN_WARNING "EXT4-fs DEBUG: inode=%lu has EXTENTS flag set!\n", ino);
+ }
+
if ((flags & EXT4_IGET_HANDLE) &&
(raw_inode->i_links_count == 0) && (raw_inode->i_mode == 0)) {
ret = -ESTALE;
--
2.43.0
Powered by blists - more mailing lists