All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Gorbachev <alex@iss-integration.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: axboe@kernel.dk, nbd@other.debian.org,
	linux-block@vger.kernel.org, kernel-team@fb.com,
	Josef Bacik <jbacik@fb.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/3] nbd: del_gendisk after we cleanup the queue
Date: Fri, 13 Apr 2018 23:03:12 -0400	[thread overview]
Message-ID: <CAM1qzF5DOT1-RwpkwtG4X4MHtTgttz1mLLmXvhg_qyvN_h5=2Q@mail.gmail.com> (raw)
In-Reply-To: <20180413160334.5496-1-josef@toxicpanda.com>

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

On Fri, Apr 13, 2018 at 12:03 PM, Josef Bacik <josef@toxicpanda.com> wrote:

> From: Josef Bacik <jbacik@fb.com>
>
> This fixes a use after free bug, we need to do the del_gendisk after we
> cleanup the queue on the device.
>

The three patches Josef submitted today fix the problem with the online
rbd-nbd expansion completely.

Fixes: c6a4759ea0c9 ("nbd: add device refcounting")

> cc: stable@vger.kernel.org

> Signed-off-by: Josef Bacik <jbacik@fb.com>
Tested-by: Alex Gorbachev <ag@iss-integration.com>

> ---

>  drivers/block/nbd.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c

> index 86258b00a1d4..e33da3e6aa20 100644

> --- a/drivers/block/nbd.c

> +++ b/drivers/block/nbd.c

> @@ -174,8 +174,8 @@ static void nbd_dev_remove(struct nbd_device *nbd)

>  {

>         struct gendisk *disk = nbd->disk;

>         if (disk) {

> -               del_gendisk(disk);

>                 blk_cleanup_queue(disk->queue);

> +               del_gendisk(disk);

>                 blk_mq_free_tag_set(&nbd->tag_set);

>                 disk->private_data = NULL;

>                 put_disk(disk);

> --

> 2.14.3

>
>

[-- Attachment #2: Type: text/html, Size: 7965 bytes --]

      parent reply	other threads:[~2018-04-14  3:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 16:03 [PATCH 1/3] nbd: del_gendisk after we cleanup the queue Josef Bacik
2018-04-13 16:03 ` [PATCH 2/3] nbd: update size when connected Josef Bacik
2018-04-14  3:02   ` Alex Gorbachev
2018-04-13 16:03 ` [PATCH 3/3] nbd: use bd_set_size when updating disk size Josef Bacik
2018-04-14  3:01   ` Alex Gorbachev
2018-04-13 16:16 ` [PATCH 1/3] nbd: del_gendisk after we cleanup the queue Bart Van Assche
2018-04-13 16:16   ` Bart Van Assche
2018-04-13 16:21   ` Josef Bacik
2018-04-13 16:25     ` Bart Van Assche
2018-04-13 16:25       ` Bart Van Assche
2018-04-14  3:03 ` Alex Gorbachev [this message]

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='CAM1qzF5DOT1-RwpkwtG4X4MHtTgttz1mLLmXvhg_qyvN_h5=2Q@mail.gmail.com' \
    --to=alex@iss-integration.com \
    --cc=axboe@kernel.dk \
    --cc=jbacik@fb.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.