summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2010-10-01 23:16:42 +0400
committerJens Axboe <jaxboe@fusionio.com>2010-10-01 23:16:42 +0400
commitc49c06e4960949a9bced708858433fcf6ca36a9c (patch)
tree071c65544a98b6b0b599896591855f8ac69ab79a /drivers
parent9355aede5a3c4975e0ba8bbfe2b9d1fd73308916 (diff)
downloadlinux-c49c06e4960949a9bced708858433fcf6ca36a9c.tar.xz
blkio-throttle: Fix possible multiplication overflow in iops calculations
o User can specify max iops value of 32bit (UINT_MAX), through cgroup interface. If a user has specified say 4294967294 (UNIT_MAX - 2), then on 32bit platform, following multiplication can overflow. io_allowed = (tg->iops[rw] * jiffy_elapsed_rnd) o Explicitly cast the multiplication to 64bit and then perform division and then check whether result is still great then UNINT_MAX. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions