summaryrefslogtreecommitdiffstats
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-18 09:34:35 -0200
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-18 09:34:35 -0200
commit15bd1cfb3055d866614cdaf38e43201936264e50 (patch)
tree020261b5a984684201a39e661934aa5dcdf82f83 /block/blk-map.c
parent9545eb61e5bb70055fd9358f25f95387f7398cba (diff)
parent019ceb7d5d252ce71001a157cf29f4ac28501b72 (diff)
downloadop-kernel-dev-15bd1cfb3055d866614cdaf38e43201936264e50.zip
op-kernel-dev-15bd1cfb3055d866614cdaf38e43201936264e50.tar.gz
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
* 'for-linus' of git://git.kernel.dk/linux-block: block: add missed trace_block_plug paride: fix potential information leak in pg_read() bio: change some signed vars to unsigned block: avoid unnecessary plug list flush cciss: auto engage SCSI mid layer at driver load time loop: cleanup set_status interface include/linux/bio.h: use a static inline function for bio_integrity_clone() loop: prevent information leak after failed read block: Always check length of all iov entries in blk_rq_map_user_iov() The Windows driver .inf disables ASPM on all cciss devices. Do the same. backing-dev: ensure wakeup_timer is deleted block: Revert "[SCSI] genhd: add a new attribute "alias" in gendisk"
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index e663ac2..164cd00 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -204,10 +204,11 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
if (!iov[i].iov_len)
return -EINVAL;
- if (uaddr & queue_dma_alignment(q)) {
+ /*
+ * Keep going so we check length of all segments
+ */
+ if (uaddr & queue_dma_alignment(q))
unaligned = 1;
- break;
- }
}
if (unaligned || (q->dma_pad_mask & len) || map_data)
OpenPOWER on IntegriCloud