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=1796385613; b=dOWk1eFV/GWr9tecjg5nkvmpoEPzGjICYXdd8MhGXMCBOPDASc/NB2KTWVYAFkZLnXNd +wlPHUsBQ/MwjsgvLNnz3xqK/X2pXaOoHr2nP/KrFlC37I0eowq4C8JxySPFvW0vvqnWM 8tkUeUGZs3kYwU5mP4siS1SEcvCTCcEU1Fq6hZgbbb1aQ0xVmd9miLmRNXbyO6GxQRh43 VCKSs8mceaZjO4YDMzrm0LP84nXBd/pDGxMVskE3JSYlPVoS6PxXdV3ZsOOYtTsZJ+I2F 64wqZ0dn0Ebqz+CkNcC5z+UnITybHaJU1w6FIrlcgeFZAt4rdZxNV+3niNzLhfP8XNg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385613; 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=UlUldysTY0x6C+2OlVWShyrP5ews51LIEVf7aaCMTdI=; b=IzyuEvriqBeumJ0rVeT60Bb2xutMBhb25xs+25n3aTyjxcz1UFODl9vvG57LgGFZkQi6 eb1LgT0zgFz6czGpcWlgbZfbnqSeaL7JAUk6aylbMVDfLJEQ1EZDataTmPY2Q4MoKXPpQ 4lqzbgE8VXA5SYHS8kqoq3qcrq/KDCTXzwrU9StE4K4627ocJRoChtqxgRqy/0LyqPDrU R2MMxizUtEAL9hi/g7dk0m4We5jvl8lVQFD0HsIVNKPsvEEZSzrn0ZROP1Mhp389h9dl6 FlgZJ6pYAY05hPUnVdwPIOBGjes44L2lc/aIVaiGUEEAAQfwSq0ge5RKW/rFAZUQLCg== 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="FqlzVS/O"; 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 DB9C2606A332; Fri, 4 Dec 2026 12:00:13 +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=FqlzVS/O Received: by smtp.kernel.org (Postfix) with ESMTPSA id 535821F000C2; Fri, 4 Dec 2026 12:00:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385613; bh=UlUldysTY0x6C+2OlVWShyrP5ews51LIEVf7aaCMTdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FqlzVS/OkdQOCW/uiaWo7O5m/4+Cgtbzl3ks5K9bHaPnRjwtv3jo9EAX4z+n3q74d Ilo78slPWWOQpp6nnXXOFrqysQDYBbR1AHHVFHxBYly6Zp9HHoCFrNQE8xSqCvZ91W S0abPOlo1JvfxVuag3DaLOBlR5tsTZafXugKpPR4= 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.6 0619/1167] dm-integrity: dont attempt to commit journal on disabled device Date: Fri, 4 Dec 2026 19:00:46 +0900 Message-ID: <20261204100718.191582496@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@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.6-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 @@ -2444,6 +2444,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); @@ -4666,7 +4671,6 @@ try_smaller_buffer: r = create_journal(ic, &ti->error); if (r) goto bad; - } if (ic->mode == 'B') {