All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+3e2c95229d1ab81a0bfd@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Re: [syzbot] WARNING in rgblk_free (2)
Date: Sat, 18 Apr 2026 05:57:28 -0700	[thread overview]
Message-ID: <69e37fb8.050a0220.24bfd3.0008.GAE@google.com> (raw)
In-Reply-To: <69651807.050a0220.eaf7.00b2.GAE@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 rgblk_free (2)
Author: tristmd@gmail.com

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

>From b5a6713d34c32c37d273e16bd59099a0a6370de9 Mon Sep 17 00:00:00 2001
From: Tristan Madani <tristan@talencesecurity.com>
Date: Sat, 18 Apr 2026 12:57:17 +0000
Subject: [PATCH] gfs2: replace WARN_ON_ONCE with fs_warn in rgblk_free

rgblk_free() triggers WARN_ON_ONCE when gfs2_rbm_from_block() fails
due to a block number outside the resource group bounds. This can be
triggered by a corrupted filesystem image, causing unnecessary kernel
warnings.

Replace WARN_ON_ONCE with fs_warn() to provide a more informative
diagnostic message while avoiding the kernel warning.

Reported-by: syzbot+3e2c95229d1ab81a0bfd@syzkaller.appspotmail.com
Fixes: 5b924ae2b7b4 ("GFS2: fix rgrp end rounding problem for bsize < page size")
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
 fs/gfs2/rgrp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 26d6c1eea5591..7707c1b1082f8 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -2266,8 +2266,11 @@ static void rgblk_free(struct gfs2_sbd *sdp, struct gfs2_rgrpd *rgd,
 	struct gfs2_bitmap *bi, *bi_prev = NULL;
 
 	rbm.rgd = rgd;
-	if (WARN_ON_ONCE(gfs2_rbm_from_block(&rbm, bstart)))
+	if (gfs2_rbm_from_block(&rbm, bstart)) {
+		fs_warn(sdp, "rgblk_free: block %llu outside rgrp\n",
+			(unsigned long long)bstart);
 		return;
+	}
 	while (blen--) {
 		bi = rbm_bi(&rbm);
 		if (bi != bi_prev) {
-- 
2.47.3


      parent reply	other threads:[~2026-04-18 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 15:49 [syzbot] [gfs2?] WARNING in rgblk_free (2) syzbot
2026-01-12 19:12 ` Andrew Price
2026-01-12 19:34   ` syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] gfs2: replace WARN_ON_ONCE with error message in syzbot
2026-04-17 16:21 ` Forwarded: Re: [syzbot] WARNING in rgblk_free syzbot
2026-04-18 12:57 ` 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=69e37fb8.050a0220.24bfd3.0008.GAE@google.com \
    --to=syzbot+3e2c95229d1ab81a0bfd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.