diff options
author | Vivek Goyal | 2010-10-01 21:16:42 +0200 |
---|---|---|
committer | Jens Axboe | 2010-10-01 21:16:42 +0200 |
commit | c49c06e4960949a9bced708858433fcf6ca36a9c (patch) | |
tree | 071c65544a98b6b0b599896591855f8ac69ab79a /sound/sparc | |
parent | 9355aede5a3c4975e0ba8bbfe2b9d1fd73308916 (diff) |
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 'sound/sparc')
0 files changed, 0 insertions, 0 deletions