All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] dm-integrity: don't increment hash_offset twice" failed to apply to 6.1-stable tree
@ 2026-07-20 15:18 gregkh
  2026-07-27 19:50 ` [PATCH 6.1.y 1/5] dm: fix trailing statements Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: gregkh @ 2026-07-20 15:18 UTC (permalink / raw)
  To: mpatocka; +Cc: stable


The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x edf025f083854f80032b73a1aad69a3c90db236f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026072050-armless-fidelity-4a3f@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From edf025f083854f80032b73a1aad69a3c90db236f Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 9 Jul 2026 21:24:09 +0200
Subject: [PATCH] dm-integrity: don't increment hash_offset twice

hash_offset is already incremented in the loop "for (i = 0; i < to_copy;
i++, ts--)". Do not increment it again.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4.6
Fixes: 84597a44a9d8 ("dm-integrity: dm integrity: add optional discard support")
Cc: stable@vger.kernel.org

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 02b2805ed33a..f5508b1bca11 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -1480,9 +1480,6 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se
 			*metadata_offset = 0;
 		}
 
-		if (unlikely(!is_power_of_2(ic->tag_size)))
-			hash_offset = (hash_offset + to_copy) % ic->tag_size;
-
 		total_size -= to_copy;
 	} while (unlikely(total_size));
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-27 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 15:18 FAILED: patch "[PATCH] dm-integrity: don't increment hash_offset twice" failed to apply to 6.1-stable tree gregkh
2026-07-27 19:50 ` [PATCH 6.1.y 1/5] dm: fix trailing statements Sasha Levin
2026-07-27 19:50   ` [PATCH 6.1.y 2/5] dm crypt: correct 'foo*' to 'foo *' Sasha Levin
2026-07-27 19:50   ` [PATCH 6.1.y 3/5] dm: add missing empty lines Sasha Levin
2026-07-27 19:50   ` [PATCH 6.1.y 4/5] dm: remove unnecessary braces from single statement blocks Sasha Levin
2026-07-27 19:50   ` [PATCH 6.1.y 5/5] dm-integrity: don't increment hash_offset twice Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.