]> Pileus Git - ~andy/linux/blobdiff - block/blk-map.c
block: Always check length of all iov entries in blk_rq_map_user_iov()
[~andy/linux] / block / blk-map.c
index e663ac2d8e68f70ff17ce274f3cebec16c1dd18c..164cd0059706214e53c01b780b353fca98d9b829 100644 (file)
@@ -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)