[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250923023148.1074924-1-kartikey406@gmail.com>
Date: Tue, 23 Sep 2025 08:01:48 +0530
From: Deepanshu Kartikey <kartikey406@...il.com>
To: syzbot+4c9d23743a2409b80293@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
Deepanshu Kartikey <kartikey406@...il.com>
Subject: [PATCH] ext4: skip inode expansion on readonly filesystems
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
Fix WARNING in ext4_xattr_block_set() during orphan cleanup on readonly
filesystems when debug_want_extra_isize mount option is used.
The issue occurs when ext4_try_to_expand_extra_isize() attempts to modify
inodes on readonly filesystems during orphan cleanup, leading to warnings
when encountering invalid xattr entries. Add a readonly check to skip
expansion in this case.
Reported-by: syzbot+4c9d23743a2409b80293@...kaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=4c9d23743a2409b80293
Signed-off-by: Deepanshu Kartikey <kartikey406@...il.com>
---
fs/ext4/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 5b7a15db4953..480f1f616e7b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -6403,6 +6403,8 @@ static int ext4_try_to_expand_extra_isize(struct inode *inode,
struct ext4_iloc iloc,
handle_t *handle)
{
+ if (sb_rdonly(inode->i_sb))
+ return 0;
int no_expand;
int error;
--
2.43.0
Powered by blists - more mailing lists