Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp878310imm; Wed, 13 Jun 2018 09:38:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIfrKZ35PNqle+EmcYdR1tStqkDMyw+SLFxmztsgY1VtCMXbtjNzPnn96IWCql/xrQNz4RB X-Received: by 2002:aa7:83d1:: with SMTP id j17-v6mr5703865pfn.236.1528907934374; Wed, 13 Jun 2018 09:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528907934; cv=none; d=google.com; s=arc-20160816; b=TVt4IM6ZfYEqjM7kmpK6O8mQpzHusRCBnxn9kzeDU3/LFN/fHs84TdXyVVtozovIUH 1URaA4Z7W19nHz+W9lSY4Q1HEmuXWE/PPSKgQAx6fX1eLlbIsVSJKTBWTwuDThdYQYmA 8/X3LpAqe6BOaTlcdnmSHz4bga/QrDKKVa7M2R0M6+Tv9RjSESEJBMjakCN49JylEr/A vqYPtLuoMi8g0+JeTe4yo0TQuOoWKXUnhIEbIf+V3cuyEOj4H5cuNeB8q/gNEE8RjqGN 4Kc2eDZRsdfTHfNVftlD1B+N+cMeZnznrh6zBjjnPgqOxUtdVXOK/n2K30Rv0tULTLpG fiBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=wxuSvonseYSLAeu1VyOhVGZL3Xtk+ykz5uHl+9cQp6w=; b=rDFdY+YUl92C32ETLOqa9CLeLmOI61PtyIcakTrvqaXODUbUfHhJByVbZD7sWed2KO Y6R8YizwYVTig5B10UCZeiitkP+c38mvD7TNB0KTZc3JtxNX0ALa3F3KumefvIeR4stv jl/5XqWKPvbeiEMKimV6jIkb9w2UEEnMQl8DtSZA5rfSFRYJS3q8f2YEjHYsO+oRzIpA XRBJtmUxgwdRsOUc0VdDhaFhoYi45kNyAuOV3Wi3fzY62R14VRkZA7BIF6ewn8bt5Z/u 7RRN9/x57U+ZeN3GXMEQ7Z7QRxuogHezAkwUnXR0jHQQvnDb04ib+WvLe+yRwHKKx6fn +o0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1-v6si2619381pgp.10.2018.06.13.09.38.40; Wed, 13 Jun 2018 09:38:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935462AbeFMQhm (ORCPT + 99 others); Wed, 13 Jun 2018 12:37:42 -0400 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 Received: from [148.252.241.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1fT8m8-0003Gi-5P; Wed, 13 Jun 2018 17:37:36 +0100 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> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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