[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YTXKwOvCtJOHnhpu@infradead.org>
Date: Mon, 6 Sep 2021 09:01:04 +0100
From: Christoph Hellwig <hch@...radead.org>
To: Daniel Wagner <dwagner@...e.de>, Hannes Reinecke <hare@...e.de>
Cc: linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
Keith Busch <kbusch@...nel.org>
Subject: Re: [PATCH v2] nvme: avoid race in shutdown namespace removal
On Thu, Sep 02, 2021 at 11:20:02AM +0200, Daniel Wagner wrote:
> When we remove the siblings entry, we update ns->head->list, hence we
> can't separate the removal and test for being empty. They have to be
> in the same critical section to avoid a race.
>
> To avoid breaking the refcounting imbalance again, add a list empty
> check to nvme_find_ns_head.
Hannes, can you look over this and run your tests on it?
Powered by blists - more mailing lists