From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:56108 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753429AbcHRJLm (ORCPT ); Thu, 18 Aug 2016 05:11:42 -0400 Subject: Patch "dm verity fec: fix block calculation" has been added to the 4.7-stable tree To: samitolvanen@google.com, gregkh@linuxfoundation.org, snitzer@redhat.com Cc: , From: Date: Thu, 18 Aug 2016 11:11:15 +0200 Message-ID: <1471511475207156@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled dm verity fec: fix block calculation to the 4.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dm-verity-fec-fix-block-calculation.patch and it can be found in the queue-4.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 602d1657c603eedd7379a8bcde1ad3a2972ecc5f Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Tue, 21 Jun 2016 11:02:42 -0700 Subject: dm verity fec: fix block calculation From: Sami Tolvanen commit 602d1657c603eedd7379a8bcde1ad3a2972ecc5f upstream. do_div was replaced with div64_u64 at some point, causing a bug with block calculation due to incompatible semantics of the two functions. Signed-off-by: Sami Tolvanen Fixes: a739ff3f543a ("dm verity: add support for forward error correction") Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-verity-fec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/md/dm-verity-fec.c +++ b/drivers/md/dm-verity-fec.c @@ -453,9 +453,7 @@ int verity_fec_decode(struct dm_verity * */ offset = block << v->data_dev_block_bits; - - res = offset; - div64_u64(res, v->fec->rounds << v->data_dev_block_bits); + res = div64_u64(offset, v->fec->rounds << v->data_dev_block_bits); /* * The base RS block we can feed to the interleaver to find out all Patches currently in stable-queue which might be from samitolvanen@google.com are queue-4.7/dm-verity-fec-fix-block-calculation.patch