On Thu, 2016-12-01 at 08:40 -0500, Martin K. Petersen wrote: > >>>>> "Ewan" == Ewan D Milne <emilne@xxxxxxxxxx> writes: ... > Specifically, the problem appears to be caused by the removal of > the setting of bio->bi_bdev, which would previously be set to NULL. > If I add: > > diff --git a/block/bio.c b/block/bio.c > index 0723d4c..ecac37b 100644 > --- a/block/bio.c > +++ b/block/bio.c > @@ -1351,6 +1351,7 @@ struct bio *bio_map_user_iov(struct request_queue > *q, > if (iter->type & WRITE) > bio->bi_rw |= REQ_WRITE; > > + bio->bi_bdev = NULL; > bio->bi_flags |= (1 << BIO_USER_MAPPED); > > /* > > Ewan> The test passes (no zero byte corruption). > Adding this seemed to work on top of the commit commit id mentioned above (37f19e57a0de3c4a3417aa13ff4d04f1e0dee4b3) but does not help on 4.7, because the test case now takes the bio_copy_user_iov() code path rather than bio_map_user_iov(). -Ewan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html