Re: FAILED: patch "[PATCH] bio-integrity: Fix bio_integrity_verify segment start bug" failed to apply to 3.13-stable tree

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

 



On Sat, Mar 01, 2014 at 05:15:38PM -0800, Nicholas A. Bellinger wrote:
> On Fri, 2014-02-28 at 17:10 -0800, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> > The patch below does not apply to the 3.13-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@xxxxxxxxxxxxxxx>.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Hi Greg,
> 
> Here's the v3.10.y+ stable version minus immutable biovec changes.
> 
> Thanks!
> 
> --nab

Thank you Nicholas, I've queued your backport for the 3.11 kernel as well.

Cheers,
--
Luís

> 
> From 7f2c1609379b38b752d4ed781cae5e406f28b63c Mon Sep 17 00:00:00 2001
> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> Date: Sat, 1 Mar 2014 17:00:16 -0800
> Subject: [PATCH] bio-integrity: Fix bio_integrity_verify segment start bug
> 
> commit 5837c80e870bc3b12ac6a98cdc9ce7a9522a8fb6 upstream.
> 
> This patch addresses a bug in bio_integrity_verify() code that has
> been causing DIF READ verify operations to be silently skipped.
> 
> The issue is that bio->bi_idx will have been incremented within
> bio_advance() code in the normal blk_update_request() ->
> req_bio_endio() completion path, and bio_integrity_verify() is
> using bio_for_each_segment() which starts the bio segment walk
> at the current bio->bi_idx.
> 
> So instead use bio_for_each_segment_all() to always start the bio
> segment walk from zero, regardless of the current bio->bi_idx
> value after bio_advance() has been called.
> 
> (Context change for v3.10.y -> v3.13.y code - nab)
> 
> Cc: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> Cc: Jens Axboe <axboe@xxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> Cc: stable@xxxxxxxxx # >= v3.10
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> ---
>  fs/bio-integrity.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
> index 6dea2b9..76273c1 100644
> --- a/fs/bio-integrity.c
> +++ b/fs/bio-integrity.c
> @@ -458,7 +458,7 @@ static int bio_integrity_verify(struct bio *bio)
>  	bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
>  	bix.sector_size = bi->sector_size;
>  
> -	bio_for_each_segment(bv, bio, i) {
> +	bio_for_each_segment_all(bv, bio, i) {
>  		void *kaddr = kmap_atomic(bv->bv_page);
>  		bix.data_buf = kaddr + bv->bv_offset;
>  		bix.data_size = bv->bv_len;
> -- 
> 1.8.5.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]