]> Pileus Git - ~andy/linux/commit
blk-mq: for_each_* macro correctness
authorJose Alonso <joalonsof@gmail.com>
Tue, 28 Jan 2014 15:09:46 +0000 (08:09 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Jan 2014 15:09:46 +0000 (08:09 -0700)
commit0d0b7d427987f6e98b6f32e84ee071f36f85c3d4
tree49e20246644048c004f1b1d3c95440538465a12b
parent17a05cca99d952f5b4766fa48a2703548966636a
blk-mq: for_each_* macro correctness

I observed that there are for_each macros that do an extra memory access
beyond the defined area.
Normally this does not cause problems.
But, this can cause exceptions. For example: if the area is allocated at
the end of a page and the next page is not accessible.

For correctness, I suggest changing the arguments of the 'for loop' like
others 'for_each' do in the kernel.

Signed-off-by: Jose Alonso <joalonsof@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blk-mq.h