[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_D10C2E5D6C0C9404EB3EED72CF4878F66F0A@qq.com>
Date: Sun, 13 Oct 2024 14:19:47 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+797d4829dafe3f11dce7@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [ocfs2?] kernel BUG in ocfs2_read_virt_blocks
if the value of flags is 0, it is meaningless to check it contains OCFS2_BH_READAHEAD
#syz test
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index f7672472fa82..0043c2428ef2 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -968,7 +968,8 @@ int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr,
if (((v_block + nr - 1) << inode->i_sb->s_blocksize_bits) >=
i_size_read(inode)) {
- BUG_ON(!(flags & OCFS2_BH_READAHEAD));
+ BUG_ON(flags && !(flags & OCFS2_BH_READAHEAD));
+ rc = flags ?: -EIO;
goto out;
}
Powered by blists - more mailing lists