mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+9013411dc43f3582823a@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] gfs2: don't add further folios to a chained bio
Date: Wed, 22 Jul 2026 19:57:32 -0700	[thread overview]
Message-ID: <6a61831c.16bfb6d0.3c48cb.0008.GAE@google.com> (raw)
In-Reply-To: <69c19ef0.050a0220.3bf4de.00a9.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH] gfs2: don't add further folios to a chained bio
Author: kmehltretter@gmail.com

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

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 6dabe73ad790..a00787df2507 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -514,6 +514,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
 	int ret = 0;
 	struct bio *bio = NULL;
 	struct folio *folio = NULL;
+	bool bio_chained = false;
 	bool done = false;
 	errseq_t since;
 
@@ -537,7 +538,8 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
 				off = 0;
 			}
 
-			if (bio && (off || block < blocks_submitted + max_blocks)) {
+			if (bio && (off || (!bio_chained &&
+					block < blocks_submitted + max_blocks))) {
 				sector_t sector = dblock << sdp->sd_fsb2bb_shift;
 
 				if (bio_end_sector(bio) == sector) {
@@ -550,6 +552,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
 
 					bio = gfs2_chain_bio(bio, blocks, sector,
 							     REQ_OP_READ);
+					bio_chained = true;
 					goto add_block_to_new_bio;
 				}
 			}
@@ -561,6 +564,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
 
 			bio = gfs2_log_alloc_bio(sdp, dblock, gfs2_end_log_read,
 						 REQ_OP_READ);
+			bio_chained = false;
 add_block_to_new_bio:
 			bio_add_folio_nofail(bio, folio, bsize, off);
 block_added:

  parent reply	other threads:[~2026-07-23  2:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 20:13 [syzbot] [gfs2?] INFO: task hung in gfs2_recover_journal (4) 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 ` [syzbot] [gfs2?] INFO: task hung in gfs2_recover_journal (4) Edward Adam Davis
2026-03-25 11:24   ` syzbot
2026-07-23  2:57 ` syzbot [this message]
2026-07-23  4:38 ` Forwarded: [PATCH] gfs2: don't add further folios to a chained bio 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=6a61831c.16bfb6d0.3c48cb.0008.GAE@google.com \
    --to=syzbot+9013411dc43f3582823a@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

all inboxes | Powered by JetHome®