From: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-team-b10kYP2dOMg@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH block/for-next] blk-iocost: fix divide-by-zero in transfer_surpluses()
Date: Fri, 11 Sep 2020 11:10:58 -0600 [thread overview]
Message-ID: <ff46ca79-433e-3279-a8eb-35156639be7b@kernel.dk> (raw)
In-Reply-To: <20200911170746.GG4295-146+VewaZzwNjtGbbfXrCEEOCMrvLtNR@public.gmane.org>
On 9/11/20 11:07 AM, Tejun Heo wrote:
> Conceptually, root_iocg->hweight_donating must be less than WEIGHT_ONE but
> all hweight calculations round up and thus it may end up >= WEIGHT_ONE
> triggering divide-by-zero and other issues. Bound the value to avoid
> surprises.
Applied, thanks.
--
Jens Axboe
next prev parent reply other threads:[~2020-09-11 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 17:07 [PATCH block/for-next] blk-iocost: fix divide-by-zero in transfer_surpluses() Tejun Heo
[not found] ` <20200911170746.GG4295-146+VewaZzwNjtGbbfXrCEEOCMrvLtNR@public.gmane.org>
2020-09-11 17:10 ` Jens Axboe [this message]
2020-09-11 22:40 ` [PATCH v2 " Tejun Heo
2020-09-11 22:43 ` Jens Axboe
[not found] ` <59987f54-47fc-766f-0667-5a90daca0b1a-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2020-09-11 22:44 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff46ca79-433e-3279-a8eb-35156639be7b@kernel.dk \
--to=axboe-tswwg44o7x1aa/9udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox