Re: [PATCH 1/4] block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX

2014-05-28 Thread Christoph Hellwig
On Sun, May 25, 2014 at 09:43:33PM +0900, Akinobu Mita wrote: > 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 m

[PATCH 1/4] block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX

2014-05-25 Thread Akinobu Mita
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: Ak