mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+9013411dc43f3582823a@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [gfs2?] INFO: task hung in gfs2_recover_journal (4)
Date: Wed, 25 Mar 2026 18:25:27 +0800	[thread overview]
Message-ID: <tencent_6325EB0D8C122B5DC9DDF91916CFF90DCB07@qq.com> (raw)
In-Reply-To: <69c19ef0.050a0220.3bf4de.00a9.GAE@google.com>

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 09c0f7f1bcdb

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 1cd8ec0bce83..fd11d5aa93b6 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -2266,6 +2266,9 @@ int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd)
 	u64 size;
 	int rc;
 	ktime_t start, end;
+	struct super_block *sb = sdp->sd_vfs;
+	sector_t maxsector = bdev_nr_sectors(sb->s_bdev);
+	u32 bshift = sdp->sd_fsb2bb_shift;
 
 	start = ktime_get();
 	lblock_stop = i_size_read(jd->jd_inode) >> shift;
@@ -2280,6 +2283,10 @@ int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd)
 		rc = gfs2_block_map(jd->jd_inode, lblock, &bh, 0);
 		if (rc || !buffer_mapped(&bh))
 			goto fail;
+		if (bh.b_blocknr << bshift > maxsector) {
+			rc = -EIO;
+			goto fail;
+		}
 		rc = gfs2_add_jextent(jd, lblock, bh.b_blocknr, bh.b_size >> shift);
 		if (rc)
 			goto fail;


  parent reply	other threads:[~2026-03-25 10:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 20:13 syzbot
2026-03-24  1:49 ` Forwarded: [PATCH] gfs2: fix hung task in gfs2_jhead_process_page syzbot
2026-03-24  2:30 ` syzbot
2026-03-24  9:27 ` Forwarded: [PATCH] gfs2: fix duplicate kmem_cache on repeated mount failure syzbot
2026-03-25  7:37 ` [syzbot] [gfs2?] INFO: task hung in gfs2_recover_journal (4) Edward Adam Davis
2026-03-25  8:18   ` syzbot
2026-03-25  7:49 ` Edward Adam Davis
2026-03-25  8:30   ` syzbot
2026-03-25  7:50 ` [PATCH] gfs2: prevent corrupt data from entering jextent Edward Adam Davis
2026-03-25 10:25 ` Edward Adam Davis [this message]
2026-03-25 11:24   ` [syzbot] [gfs2?] INFO: task hung in gfs2_recover_journal (4) syzbot
2026-07-23  2:57 ` Forwarded: [PATCH] gfs2: don't add further folios to a chained bio syzbot
2026-07-23  4:38 ` syzbot
     [not found] <20260324014901.1451209-1-kartikey406@gmail.com>
2026-03-24  2:21 ` [syzbot] [gfs2?] INFO: task hung in gfs2_recover_journal (4) syzbot
     [not found] <20260324023042.1453608-1-kartikey406@gmail.com>
2026-03-24  2:48 ` syzbot
     [not found] <20260324092747.1459265-1-kartikey406@gmail.com>
2026-03-24  9:46 ` syzbot
     [not found] <20260723025728.43981-1-kmehltretter@gmail.com>
2026-07-23  3:57 ` syzbot
     [not found] <20260723043654.48231-1-kmehltretter@gmail.com>
2026-07-23  5:40 ` syzbot

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_6325EB0D8C122B5DC9DDF91916CFF90DCB07@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+9013411dc43f3582823a@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®