Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2184638yba; Mon, 6 May 2019 00:58:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFZmQKcn7b0g7554eeb6wCrxngnyncpRQv8PhmKiy/Vb2wsk6A1+cbAI1B9XWeqNV/zb9M X-Received: by 2002:a17:902:4a:: with SMTP id 68mr15756559pla.235.1557129539521; Mon, 06 May 2019 00:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557129539; cv=none; d=google.com; s=arc-20160816; b=fVIJBy4crQSUJvbPFki3gOg/mLjqDTN2Z+XL3uaWZ9/D2HViN2xWmojYzdRzn06I1x ahxhr7453B5iuCoyGEGg51mhJmJ4/jyPNiNr1euweujYkNsH7wJ8uRJWTz8tfhrqSroG bmQh3SJvfuoAT0txBvQ+sjc2kWBvpUfRdXst1ZHiBlsf/j0H6WTWpMGrZLwHjYhdxnz+ hKLph9cAfXskIEcnDCpklxiaVMMErKuRNbA9pBN2asGPA33JUiqhAOgGX1MFOlm9CA/s 5HdqoTXR9DLW1Qh4SufqH3Ry1Y6wBbS8sGytV1IqheMHr7PU05i1SVF1jUfFfk8+4OVJ Utvw== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=bUcUcM3eMtVm0jxYhg5oTj0xyXA/GwANu2C/Og+68yk=; b=vB3Ek86z5kaR4++thFlQEmQQ96Y/Y9lZijDr/bnmXin7ZnLV3IPwDXNcob7LSEd0jt ja1+ZbqYM12RGm2iuZBdv1UKUfB9ENVgdBbUhN8EOck9mFphZIDO9SZYmhOByLY17fLh OCcK0t0NVeWMwUTxA5wYVMGfXmeoL+UEmffH5ZB8CqE5dLYU/QzvR06sufNR+JPg84zD ROKBeaAx4Sf6acaAM+5E1rXkfWE1YxQSlYvL7Yk8c+2vWuXN7m0rFIwORKSasaMs2hko ZFKzGi3IPPwQ0UPfBy6ApC8zTL1KDWAydQYc/4snV8+ftmxxUbtjHRq8mjnKsGtX/Ew0 IIlQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v22si13104484pfm.151.2019.05.06.00.58.43; Mon, 06 May 2019 00:58:59 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbfEFH4f (ORCPT + 99 others); Mon, 6 May 2019 03:56:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44380 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfEFH4e (ORCPT ); Mon, 6 May 2019 03:56:34 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04CB43086227; Mon, 6 May 2019 07:56:34 +0000 (UTC) Received: from maximlenovopc.usersys.redhat.com (unknown [10.35.206.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 921CE5DA35; Mon, 6 May 2019 07:56:22 +0000 (UTC) Message-ID: <599086a07da9943e1748d5608357ebc85b2330db.camel@redhat.com> Subject: Re: [PATCH v2 08/10] nvme/pci: implement the mdev external queue allocation interface From: Maxim Levitsky To: Keith Busch Cc: Fam Zheng , kvm@vger.kernel.org, Wolfram Sang , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Keith Busch , Kirti Wankhede , Mauro Carvalho Chehab , "Paul E . McKenney" , Christoph Hellwig , Sagi Grimberg , Liang Cunming , Jens Axboe , Alex Williamson , John Ferlan , Liu Changpeng , Greg Kroah-Hartman , "Heitke, Kenneth" , Nicolas Ferre , Paolo Bonzini , Amnon Ilan , "David S . Miller" Date: Mon, 06 May 2019 10:55:19 +0300 In-Reply-To: <20190503120915.GA30013@localhost.localdomain> References: <20190502114801.23116-1-mlevitsk@redhat.com> <20190502114801.23116-9-mlevitsk@redhat.com> <63a499c3-25be-5c5b-5822-124854945279@intel.com> <20190503120915.GA30013@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 06 May 2019 07:56:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-05-03 at 06:09 -0600, Keith Busch wrote: > On Fri, May 03, 2019 at 12:20:17AM +0300, Maxim Levitsky wrote: > > On Thu, 2019-05-02 at 15:12 -0600, Heitke, Kenneth wrote: > > > On 5/2/2019 5:47 AM, Maxim Levitsky wrote: > > > > +static void nvme_ext_queue_free(struct nvme_ctrl *ctrl, u16 qid) > > > > +{ > > > > + struct nvme_dev *dev = to_nvme_dev(ctrl); > > > > + struct nvme_queue *nvmeq; > > > > + > > > > + mutex_lock(&dev->ext_dev_lock); > > > > + nvmeq = &dev->queues[qid]; > > > > + > > > > + if (WARN_ON(!test_bit(NVMEQ_EXTERNAL, &nvmeq->flags))) > > > > + return; > > > > > > This condition is probably not expected to happen (since its a warning) > > > but do you need to unlock the ext_dev_lock before returning? > > > > This is true, I will fix this. This used to be BUG_ON, but due to > > checkpatch.pl > > complains I turned them all to WARN_ON, and missed this. > > Gentle reminder to trim your replies to the relevant context. It's > much easier to read when we don't need to scroll through hundreds of > unnecessary lines. I fully agree, sorry! Next time I will do this. Best regards, Maxim Levitsky