From nobody Fri Jul 24 05:21:39 2026 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84BDC38B14C for ; Thu, 23 Jul 2026 04:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784781513; cv=none; b=K1I0RdLU4kaDz79IOyMZ4O3oBC0BRFK1O3SXMEYRkpusqeNo8IwNT2z4C1hu1QY0aYAjLAEdjql51IXRS6E2WcshPfvQRiUt+0rfwpmwTiP96m6kteiXIpboTK26v7Vv+nH1TG7nKnllgMwPWPRUCcrYqF18flllI36yfSnswxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784781513; c=relaxed/simple; bh=Ga0we5p58jWG9bP32Zvl8Lfaj17ZKpkCycGi85NTXDo=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=E801KtFsGn/pqfKoWGT4wEmFNmfpVNRfV733j0noiAHlVoltbwdm61Ndhm+4AHUxn/OGuTW2D+1p2YMdcks0msnHEBx+nnrtjbUpDVB5c8ws9eRMbrQ9T4kT8G0HM1K3OyTBfG5CL6t9X37bvU6QjKpsoGPUpBqh61Sm3ERlZWQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.167.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-4a45997664aso309766b6e.1 for ; Wed, 22 Jul 2026 21:38:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784781496; x=1785386296; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=AGwx7gaXzqhWQA+Y77rX5Yb24Re5Jf06Ve5FSkGjwfI=; b=soT4YkFN9LVTu/X3aNLwmqmaTdTVcP43lt2/yxV9h/+ORmcJSPyJ8Unx88ZWBD6tH1 chcvoBc+TBuZHiX0nUbmO4o52yITJF7+GsnWRFoK44OUKpghP6KzAHszAnxPVAw72ovj 3WOLzzwLcCihagqJV8UsTuZausHUfTuO4GmL2ZsiV/Az5V3904SjEyGrIHQwtUEwZLLA V4cvow6dZ5OsqZyxoT6u6SQRh5012RHAn+gJlCOtzq8HLIhn0EzAw/UA2oWa9gtENlji eSiaFwbyH6p/6vF/rUzcb2bUtLOete5hH5WbTjc9J9xeMlU90Bw791W792PQ6ZuwH1pK WuvA== X-Gm-Message-State: AOJu0Yw8FvszTHaTF/E3yPSL/qHtuZZE/s8bivPAT1jH9/IJMqIBCfOy MU/sXaqhFC3sIn6lPAxRPS+Pp9yUDd6VwAT2shxJHhLPI74ziiDrEflvZwLzr5Hoe6qOqzFZjQ5 njEfH6Twk3OXohuVdvteIYEIKhvoPlg6tx3/wQzwzefR2aG0oA7Y8b//juhc= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6808:191e:b0:495:f230:a340 with SMTP id 5614622812f47-4ab3544eccfmr1076656b6e.28.1784781495767; Wed, 22 Jul 2026 21:38:15 -0700 (PDT) Date: Wed, 22 Jul 2026 21:38:15 -0700 In-Reply-To: <69c19ef0.050a0220.3bf4de.00a9.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a619ab7.16bfb6d0.3c48cb.000d.GAE@google.com> Subject: Forwarded: [PATCH] gfs2: don't add further folios to a chained bio From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 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 =3D 0; struct bio *bio =3D NULL; struct folio *folio =3D NULL; + bool bio_chained =3D false; bool done =3D false; errseq_t since; =20 @@ -537,7 +538,8 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_= log_header_host *head) off =3D 0; } =20 - if (bio && (off || block < blocks_submitted + max_blocks)) { + if (bio && (off || (!bio_chained && + block < blocks_submitted + max_blocks))) { sector_t sector =3D dblock << sdp->sd_fsb2bb_shift; =20 if (bio_end_sector(bio) =3D=3D sector) { @@ -550,6 +552,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_= log_header_host *head) =20 bio =3D gfs2_chain_bio(bio, blocks, sector, REQ_OP_READ); + bio_chained =3D 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) =20 bio =3D gfs2_log_alloc_bio(sdp, dblock, gfs2_end_log_read, REQ_OP_READ); + bio_chained =3D false; add_block_to_new_bio: bio_add_folio_nofail(bio, folio, bsize, off); block_added: