From: syzbot <syzbot+26e96d7e92eed8a21405@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Re: [syzbot] WARNING in gfs2_check_blk_type
Date: Fri, 17 Apr 2026 09:21:55 -0700 [thread overview]
Message-ID: <69e25e23.a00a0220.1bd0ca.000e.GAE@google.com> (raw)
In-Reply-To: <000000000000ca86690612e7cacd@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [syzbot] WARNING in gfs2_check_blk_type
Author: tristmd@gmail.com
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>From a57e64056f6b6fa2ede96b624b49baeb5269478b Mon Sep 17 00:00:00 2001
From: Tristan Madani <tristan@talencesecurity.com>
Date: Fri, 17 Apr 2026 16:15:20 +0000
Subject: [PATCH] gfs2: remove WARN_ON_ONCE in gfs2_check_blk_type()
gfs2_check_blk_type() wraps gfs2_rbm_from_block() in
!WARN_ON_ONCE(), triggering a kernel WARNING on corrupted
filesystems. Replace with a plain error check and map the
error to -ESTALE for the caller.
Reported-by: syzbot+26e96d7e92eed8a21405@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=26e96d7e92eed8a21405
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
fs/gfs2/rgrp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 5988a16..da94c25 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -2625,7 +2625,9 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type)
rbm.rgd = rgd;
error = gfs2_rbm_from_block(&rbm, no_addr);
- if (!WARN_ON_ONCE(error)) {
+ if (error) {
+ error = -ESTALE;
+ } else {
/*
* No need to take the local resource group lock here; the
* inode glock of @no_addr provides the necessary
--
2.47.3
prev parent reply other threads:[~2026-04-17 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 11:03 [syzbot] [gfs2?] WARNING in gfs2_check_blk_type (2) syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] gfs2: remove WARN_ON_ONCE in gfs2_check_blk_type syzbot
2026-04-17 16:21 ` syzbot [this message]
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=69e25e23.a00a0220.1bd0ca.000e.GAE@google.com \
--to=syzbot+26e96d7e92eed8a21405@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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