[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y4TrLfOj5sTpXyYR@slm.duckdns.org>
Date: Mon, 28 Nov 2022 07:09:01 -1000
From: Tejun Heo <tj@...nel.org>
To: Li Jinlin <lijinlin3@...wei.com>
Cc: josef@...icpanda.com, axboe@...nel.dk, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
liuzhiqiang26@...wei.com
Subject: Re: [PATCH] blk-iocost: fix shift-out-of-bounds in iocg_hick_delay()
On Sat, Nov 26, 2022 at 08:14:58PM +0800, Li Jinlin wrote:
> if (iocg->delay)
> - delay = iocg->delay >> div64_u64(tdelta, USEC_PER_SEC);
> + delay = iocg->delay >> min(div64_u64(tdelta, USEC_PER_SEC), 63);
Let's just set delay to 0 if the shift is too big.
Thanks.
--
tejun
Powered by blists - more mailing lists