[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_DECFB60DE7258B8DBB121FDDC75DCF191707@qq.com>
Date: Sun, 24 Dec 2023 17:14:09 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+2c4a3b922a860084cc7f@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [ext4?] WARNING in lock_two_nondirectories
please test WARNING in lock_two_nondirectories
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a39b6ac3781d
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 61277f7f8722..692376f3ce0a 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4710,6 +4710,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
}
inode = iget_locked(sb, ino);
+ printk("ino: %u, in: %p, %s\n", ino, inode, __func__);
if (!inode)
return ERR_PTR(-ENOMEM);
if (!(inode->i_state & I_NEW)) {
@@ -4944,8 +4945,13 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
inode->i_fop = &ext4_file_operations;
ext4_set_aops(inode);
} else if (S_ISDIR(inode->i_mode)) {
- inode->i_op = &ext4_dir_inode_operations;
- inode->i_fop = &ext4_dir_operations;
+ printk("i: %p, %s\n", inode, __func__);
+ if (ino == EXT4_BOOT_LOADER_INO)
+ make_bad_inode(inode);
+ else {
+ inode->i_op = &ext4_dir_inode_operations;
+ inode->i_fop = &ext4_dir_operations;
+ }
} else if (S_ISLNK(inode->i_mode)) {
/* VFS does not allow setting these so must be corruption */
if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) {
Powered by blists - more mailing lists