diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-04 06:42:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-08 20:34:05 +0300 |
commit | f576721152fdf9c919cc2f16784f5caa6bba91ff (patch) | |
tree | bc2601cdf65bf7399fbfed956ff6717238af53cd /drivers/dma-buf/sync_trace.h | |
parent | a5389c80992f0001ee505838fe6a8b20897ce96e (diff) | |
download | linux-f576721152fdf9c919cc2f16784f5caa6bba91ff.tar.xz |
block: bio-integrity: Advance seed correctly for larger interval sizes
commit b13e0c71856817fca67159b11abac350e41289f5 upstream.
Commit 309a62fa3a9e ("bio-integrity: bio_integrity_advance must update
integrity seed") added code to update the integrity seed value when
advancing a bio. However, it failed to take into account that the
integrity interval might be larger than the 512-byte block layer
sector size. This broke bio splitting on PI devices with 4KB logical
blocks.
The seed value should be advanced by bio_integrity_intervals() and not
the number of sectors.
Cc: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: stable@vger.kernel.org
Fixes: 309a62fa3a9e ("bio-integrity: bio_integrity_advance must update integrity seed")
Tested-by: Dmitry Ivanov <dmitry.ivanov2@hpe.com>
Reported-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220204034209.4193-1-martin.petersen@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma-buf/sync_trace.h')
0 files changed, 0 insertions, 0 deletions