From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>,
Matias Bjorling <matias.bjorling@wdc.com>
Subject: Re: [PATCH] block: Fix potential overflow in blk_report_zones()
Date: Tue, 9 Jul 2019 15:37:34 +0200 [thread overview]
Message-ID: <20190709133734.GB2201@lst.de> (raw)
In-Reply-To: <20190709075348.24823-1-damien.lemoal@wdc.com>
On Tue, Jul 09, 2019 at 04:53:48PM +0900, Damien Le Moal wrote:
> For large values of the number of zones reported, the sector increment
> calculated with "blk_queue_zone_sectors(q) * n" can overflow the
> unsigned int type used. Fix this with a cast to sector_t type.
How about just returning a sector_t from blk_queue_zone_sectors, turning
this into an automatic implicit cast for all callers?
next prev parent reply other threads:[~2019-07-09 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 7:53 [PATCH] block: Fix potential overflow in blk_report_zones() Damien Le Moal
2019-07-09 13:37 ` Christoph Hellwig [this message]
2019-07-09 14:34 ` Damien Le Moal
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=20190709133734.GB2201@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=matias.bjorling@wdc.com \
/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;
as well as URLs for NNTP newsgroup(s).