From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388338; b=iEKY4JbucD9oP4w648FPyU0KmVLFpMMXPe9igQWqzbtbFiDj91zkABW6vyL3pJ5sN/pj rh9IW67Jq7rplWLegAof4XET0aJxqdkmDUjr1KI+alazgucF3w7DhZUScqdhm1qGZjp9Y JFUfwo5K/C+VPI0oPgTR/grbjq8irCJ1ZUlzqwRxkQOMbTNZLVoyb6oPLMxuTRzW9e1+U PnSLTEVzFE2+Qxs+wmt9E/5Mfkh/vM2J/aXl2ugXUrG088QyUSEuSbS1iiVi5vrdw8K/B uNTLK4qMMXoad0kcaEHCTfP/wsN+DTmfNLNSGdnWE9c/1ozF+J/ncXpj3jk7oasD4Bg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388338; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=xgnk07+oFT4o9FjLeyyK/s/EINfYinys9yZl0K2vjvo=; b=uMRda5bBvdiEtW6kwGwN633Kz3/btqmd1GUjK5ilzC1wHb1ZsinKC6zLD9/Ix95Im4Tc zRI0iJaACvwVTzzxR97yBN5qqsTGhomeIGWoxE+gBp92pKX6gDrxdtmj2EIRlrKaQySk8 HOVJ8O8OjQfPhr/oo77MswrvqDSeLLnFPQ6fgkWpFx0DspwC2InmN4ZW2ma6ARdUQy6Qd Vm+WBqKV/J+2Zo8vuZGA5UvQXaph+n/TP7OMiLgRHkpg4PRQescLv46kCciFahS1ttil5 6aal5STe0Qq4IFqRrHgfU/qYOk79KQMv77cA3DamZQjuWEGLJUt/HjBAUOxfFrzHWsA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="Xp/xMy4E"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A4C7606A32D; Fri, 4 Dec 2026 12:45:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Xp/xMy4E Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29D3A1F00939; Fri, 4 Dec 2026 12:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388337; bh=xgnk07+oFT4o9FjLeyyK/s/EINfYinys9yZl0K2vjvo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Xp/xMy4EKO3h5iCJE/+vY+kAKF0LfOuPTypRrDnPyE661G1NbJrRmyMcaHxx77T2i kR069neFYhhvIdJRCrHsScJLigFh2ijLuTyeVLwXSdprtNuSjX0ZSVcM3Qp5+VSHS/ OSitvvuY8Mj9fFq+BQmnY77R/sGFn7X5hhqV7zyM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+94dac3c75477e184f0b0@syzkaller.appspotmail.com, Mikulas Patocka Subject: [PATCH 6.1 0575/1059] dm-integrity: dont attempt to commit journal on disabled device Date: Fri, 4 Dec 2026 19:01:46 +0900 Message-ID: <20261204100659.063201504@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikulas Patocka commit e5e03918fbec31f0c896f4f43c2bd2aadf35d43d upstream. If the device is disabled due to an error, we shouldn't attempt to flush the journal. We jump straight to the label release_flush_bios, that will call do_endio on all queued bios. do_endio will terminate the bios with the error. This fixes WARN_ON in the function pad_uncommitted reported by syzkaller. Reported-by: syzbot+94dac3c75477e184f0b0@syzkaller.appspotmail.com Closes: https://syzbot.org/bug?extid=94dac3c75477e184f0b0 Fixes: 7eada909bfd7 ("dm: add integrity target") Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-integrity.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -2460,6 +2460,11 @@ static void integrity_commit(struct work spin_lock_irq(&ic->endio_wait.lock); flushes = bio_list_get(&ic->flush_bio_list); + if (unlikely(dm_integrity_failed(ic))) { + wake_up_locked(&ic->endio_wait); + spin_unlock_irq(&ic->endio_wait.lock); + goto release_flush_bios; + } if (unlikely(ic->mode != 'J')) { spin_unlock_irq(&ic->endio_wait.lock); dm_integrity_flush_buffers(ic, true); @@ -4669,7 +4674,6 @@ try_smaller_buffer: r = create_journal(ic, &ti->error); if (r) goto bad; - } if (ic->mode == 'B') {