From: Akinobu Mita Date: Sun, 25 May 2014 12:43:33 +0000 (+0900) Subject: block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX X-Git-Tag: omap-for-v3.17/fixes-against-rc2~75^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63f264965947ac6299452711f614f086955b2515;p=pandora-kernel.git block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX BLKSECTGET ioctl loads the request queue's max_sectors as unsigned short value to the argument pointer. So if the max_sector is greater than USHRT_MAX, the upper 16 bits of that is just discarded. In such case, USHRT_MAX is more preferable than the lower 16 bits of max_sectors. Signed-off-by: Akinobu Mita Cc: Jens Axboe Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: linux-scsi@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- Reading git-diff-tree failed