]> git.baikalelectronics.ru Git - kernel.git/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)
commit5b1d27a9a715012c44872e61881d5d0eab95c339
tree49e20246644048c004f1b1d3c95440538465a12b
parent65c2ad2e14e33dc7b0d05453e248fa1fe0e3c533
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