summaryrefslogtreecommitdiffstats
path: root/ipc/compat_mq.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2014-11-25 17:40:25 -0800
committerJens Axboe <axboe@fb.com>2014-12-02 08:15:21 -0700
commit594416a72032684792bb22510c538098db10b750 (patch)
treebdb6fcb0ebba99a19d99c83123ef86cfd5c76911 /ipc/compat_mq.c
parent009d0431c3914de64666bec0d350e54fdd59df6a (diff)
downloadop-kernel-dev-594416a72032684792bb22510c538098db10b750.zip
op-kernel-dev-594416a72032684792bb22510c538098db10b750.tar.gz
block: fix regression where bio_integrity_process uses wrong bio_vec iterator
bio integrity handling is broken on a system with LVM layered atop a DIF/DIX SCSI drive because device mapper clones the bio, modifies the clone, and sends the clone to the lower layers for processing. However, the clone bio has bi_vcnt == 0, which means that when the sd driver calls bio_integrity_process to attach DIX data, the for_each_segment_all() call (which uses bi_vcnt) returns immediately and random garbage is sent to the disk on a disk write. The disk of course returns an error. Therefore, teach bio_integrity_process() to use bio_for_each_segment() to iterate the bio_vecs, since the per-bio iterator tracks which bio_vecs are associated with that particular bio. The integrity handling code is effectively part of the "driver" (it's not the bio owner), so it must use the correct iterator function. v2: Fix a compiler warning about abandoned local variables. This patch supersedes "block: bio_integrity_process uses wrong bio_vec iterator". Patch applies against 3.18-rc6. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'ipc/compat_mq.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud