Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: linux-nvme@lists.infradead.org, Jens Axboe <axboe@kernel.dk>,
	Jay Freyensee <james_p_freyensee@linux.intel.com>,
	Solganik Alexander <sashas@lightbitslabs.com>,
	Christoph Hellwig <hch@lst.de>,
	"# v4 . 8+" <stable@vger.kernel.org>
Subject: Re: [PATCH] nvmet: Fix possible infinite loop triggered on hot namespace removal
Date: Tue, 1 Nov 2016 06:43:52 -0700	[thread overview]
Message-ID: <20161101134352.GA5096@infradead.org> (raw)
In-Reply-To: <1477819337-31190-1-git-send-email-sagi@grimberg.me>

>  void nvmet_ns_disable(struct nvmet_ns *ns)
> @@ -324,13 +324,10 @@ void nvmet_ns_disable(struct nvmet_ns *ns)
>  	struct nvmet_subsys *subsys = ns->subsys;
>  	struct nvmet_ctrl *ctrl;
>  
> -	mutex_lock(&subsys->lock);
> -	if (list_empty(&ns->dev_link)) {
> -		mutex_unlock(&subsys->lock);
> +	if (!test_and_clear_bit(NVMET_NS_ENABLED, &ns->flags))
>  		return;
> -	}
> -	list_del_init(&ns->dev_link);
> -	mutex_unlock(&subsys->lock);
> +
> +	list_del_rcu(&ns->dev_link);

We'll still need the lock here, don't we?

  reply	other threads:[~2016-11-01 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30  9:22 [PATCH] nvmet: Fix possible infinite loop triggered on hot namespace removal Sagi Grimberg
2016-11-01 13:43 ` Christoph Hellwig [this message]
2016-11-01 14:37   ` Sagi Grimberg

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=20161101134352.GA5096@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=james_p_freyensee@linux.intel.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=sashas@lightbitslabs.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