From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+797d4829dafe3f11dce7@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [ocfs2?] kernel BUG in ocfs2_read_virt_blocks
Date: Sun, 13 Oct 2024 14:19:47 +0800 [thread overview]
Message-ID: <tencent_D10C2E5D6C0C9404EB3EED72CF4878F66F0A@qq.com> (raw)
In-Reply-To: <670a46a0.050a0220.4cbc0.001e.GAE@google.com>
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;
}
next prev parent reply other threads:[~2024-10-13 6:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 9:51 [syzbot] " syzbot
2024-10-13 6:19 ` Edward Adam Davis [this message]
2024-10-13 7:29 ` syzbot
2024-10-13 13:25 ` [PATCH] ocfs2: BUG is meaningless when the flags is 0 Edward Adam Davis
2024-10-13 23:31 ` [PATCH V2] " Edward Adam Davis
2024-10-14 6:28 ` heming.zhao
2024-10-14 7:00 ` [syzbot] [ocfs2?] kernel BUG in ocfs2_read_virt_blocks syzbot
2024-10-14 6:33 ` [PATCH V2] ocfs2: BUG is meaningless when the flags is 0 Joseph Qi
2024-10-14 11:47 ` [PATCH V3] ocfs2: add a sanity check for i_size Edward Adam Davis
2024-10-14 12:24 ` [syzbot] [ocfs2?] kernel BUG in ocfs2_read_virt_blocks syzbot
2024-10-16 2:06 ` [PATCH V3] ocfs2: add a sanity check for i_size Joseph Qi
2024-10-16 2:10 ` Joseph Qi
2024-10-16 3:52 ` Edward Adam Davis
2024-10-16 11:08 ` Joseph Qi
2024-10-16 11:57 ` Edward Adam Davis
2024-10-16 12:13 ` Joseph Qi
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=tencent_D10C2E5D6C0C9404EB3EED72CF4878F66F0A@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+797d4829dafe3f11dce7@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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
all inboxes | Powered by JetHome®