]> git.baikalelectronics.ru Git - kernel.git/commit
bio: fix argument of __bio_add_page() for max_sectors > 0xffff
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 18 Nov 2013 13:11:42 +0000 (22:11 +0900)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Nov 2013 19:31:27 +0000 (12:31 -0700)
commit809993c9f94f346765eb59a0cce15b49297da2b8
treec33d3575e41db4350bce9e6f30d684ce735bebaf
parent19f6711c62bb2b07a9bb8e62deec1932c95dc5b2
bio: fix argument of __bio_add_page() for max_sectors > 0xffff

The data type of max_sectors and max_hw_sectors in queue settings are
unsigned int.  But these values are passed to __bio_add_page() as an
argument whose data type is unsigned short.  In the worst case such as
max_sectors is 0x10000, bio_add_page() can't add a page and IOs can't
proceed.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/bio.c