From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from imap1.codethink.co.uk ([176.9.8.82]:47983 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935042AbeFMQhl (ORCPT ); Wed, 13 Jun 2018 12:37:41 -0400 Message-ID: <1528907855.2289.157.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 110/268] nvme-pci: Fix nvme queue cleanup if IRQ setup fails From: Ben Hutchings To: Keith Busch Cc: Jianchao Wang , stable@vger.kernel.org, Sasha Levin , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Date: Wed, 13 Jun 2018 17:37:35 +0100 In-Reply-To: <20180613163007.GD5574@localhost.localdomain> References: <20180528100202.045206534@linuxfoundation.org> <20180528100214.621806271@linuxfoundation.org> <1528906474.2289.155.camel@codethink.co.uk> <20180613163007.GD5574@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On Wed, 2018-06-13 at 10:30 -0600, Keith Busch wrote: > On Wed, Jun 13, 2018 at 05:14:34PM +0100, Ben Hutchings wrote: > > On Mon, 2018-05-28 at 12:01 +0200, Greg Kroah-Hartman wrote: > > >   result = adapter_alloc_sq(dev, qid, nvmeq); > > >   if (result < 0) > > > @@ -1597,9 +1597,12 @@ static int nvme_create_queue(struct nvme > > >   return result; > > >   > > >   release_sq: > > > + dev->online_queues--; > > > > This addition looks wrong.  dev->online_queues is incremented by > > nvme_init_queue(), but this function only calls that at a point where > > it is sure to succeed.  So why would a failure path need to decrement > > it? > > Thank you very much the catching that. This particular patch is indeed > not correct without the following: > >   161b8be2bd6ab ("nvme-pci: initialize queue memory before interrupts") Oh, now I see. Do you think that commit is suitable for stable branches? Ben. -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom