Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge
SG_GET_RESERVED_SIZE and SG_SET_RESERVED_SIZE ioctls access a reserved buffer in bytes as int type. The value needs to be capped at the request queue's max_sectors. But integer overflow is not correctly handled in the calculation when converting max_sectors from sectors to bytes. Signed-off-by: Akinobu Mita <[email protected]> Cc: Jens Axboe <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Douglas Gilbert <[email protected]> Cc: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information