Patch "dm verity fec: fix hash block number in verity_fec_decode" has been added to the 5.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dm verity fec: fix hash block number in verity_fec_decode

to the 5.6-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-hash-block-number-in-verity_fec_de.patch
and it can be found in the queue-5.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3e1306d8025942610f0277639d1aa5e82b25a933
Author: Sunwook Eom <speed.eom@xxxxxxxxxxx>
Date:   Fri Apr 10 12:54:19 2020 +0900

    dm verity fec: fix hash block number in verity_fec_decode
    
    commit ad4e80a639fc61d5ecebb03caa5cdbfb91fcebfc upstream.
    
    The error correction data is computed as if data and hash blocks
    were concatenated. But hash block number starts from v->hash_start.
    So, we have to calculate hash block number based on that.
    
    Fixes: a739ff3f543af ("dm verity: add support for forward error correction")
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Sunwook Eom <speed.eom@xxxxxxxxxxx>
    Reviewed-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
    Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/md/dm-verity-fec.c b/drivers/md/dm-verity-fec.c
index 49147e634046d..fb41b4f23c489 100644
--- a/drivers/md/dm-verity-fec.c
+++ b/drivers/md/dm-verity-fec.c
@@ -435,7 +435,7 @@ int verity_fec_decode(struct dm_verity *v, struct dm_verity_io *io,
 	fio->level++;
 
 	if (type == DM_VERITY_BLOCK_TYPE_METADATA)
-		block += v->data_blocks;
+		block = block - v->hash_start + v->data_blocks;
 
 	/*
 	 * For RS(M, N), the continuous FEC data is divided into blocks of N



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux