stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: stable@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] null_blk: Fix zone size initialization
Date: Mon, 4 Jan 2021 11:53:20 +0100	[thread overview]
Message-ID: <X/LzoKkYXJMdfhlJ@kroah.com> (raw)
In-Reply-To: <20210104061044.664481-1-damien.lemoal@wdc.com>

On Mon, Jan 04, 2021 at 03:10:44PM +0900, Damien Le Moal wrote:
> commit 0ebcdd702f49aeb0ad2e2d894f8c124a0acc6e23 upstream.
> 
> For a null_blk device with zoned mode enabled is currently initialized
> with a number of zones equal to the device capacity divided by the zone
> size, without considering if the device capacity is a multiple of the
> zone size. If the zone size is not a divisor of the capacity, the zones
> end up not covering the entire capacity, potentially resulting is out
> of bounds accesses to the zone array.
> 
> Fix this by adding one last smaller zone with a size equal to the
> remainder of the disk capacity divided by the zone size if the capacity
> is not a multiple of the zone size. For such smaller last zone, the zone
> capacity is also checked so that it does not exceed the smaller zone
> size.

Now queued up, thanks.

greg k-h

  reply	other threads:[~2021-01-04 10:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 11:49 FAILED: patch "[PATCH] null_blk: Fix zone size initialization" failed to apply to 5.4-stable tree gregkh
2021-01-04  6:10 ` [PATCH] null_blk: Fix zone size initialization Damien Le Moal
2021-01-04 10:53   ` Greg Kroah-Hartman [this message]
2021-01-04  6:13 ` FAILED: patch "[PATCH] null_blk: Fix zone size initialization" failed to apply to 5.4-stable tree Damien Le Moal
  -- strict thread matches above, loose matches on Subject: below --
2021-01-04 10:52 FAILED: patch "[PATCH] null_blk: Fix zone size initialization" failed to apply to 4.19-stable tree gregkh
2021-01-04 12:11 ` [PATCH] null_blk: Fix zone size initialization Damien Le Moal
2021-01-04 12:25   ` Greg Kroah-Hartman
2020-12-28 11:49 FAILED: patch "[PATCH] null_blk: Fix zone size initialization" failed to apply to 4.19-stable tree gregkh
2021-01-04  6:11 ` [PATCH] null_blk: Fix zone size initialization 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=X/LzoKkYXJMdfhlJ@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).