Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp249711imm; Tue, 15 May 2018 00:48:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZovlqntmjxLTRtgGfpqIWBxSP9DnJ612lMOGg/zMYK1h94NrfU9e1J9jFHClOxXmfmQFnon X-Received: by 2002:a62:1152:: with SMTP id z79-v6mr13857646pfi.135.1526370513765; Tue, 15 May 2018 00:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526370513; cv=none; d=google.com; s=arc-20160816; b=LbvzUtgwVh1srXYG+AsRHzAUOKt8shn4BkTjPgkox6E1+jrwH9GV5c6xFi4Grs3pST JqloFGyN3oKudBmBqPrRQe6KOOwCbhpggSrviW62iLKDKxMmHJzu1Oj5RuwRmSF1M7mu 9XwgKHRzAt9Ws1QBRJx7HLcXdfQofGStd69aI2sss79qBf7zEC1KbxIo4fXG4kg2dT6D NxDHac0N0QVhZ/qDduXOgpzzjC9K+73AdWa2SS4dMVmKDXwBvGijP7uBofLrrIycliiL t2j7mMdT7TAd2dvEwJHMQ+TkoTEkKwJ8ZMMBUvXRZgR7/Cf44bB7WF7IPF1wI1C2DgR8 kTRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ywSDJknne3+cMo9/Lck5F8B/Ws2m7mGKOkqXUzZ0jaM=; b=JQzBBL0wT3jQYkkDJ+jNGBlQqOkyI1ITUFXCNR2d9s7VWi/1vh2yRyGFYho6dUBlPy /K9WxwHTYkcXmDkgwtrH3vpanBQ+wDsJHf9pi6nMija3Zi7sQ+s9n+Z6rlJV5SymhM6+ S/JP+4MAn625tNA0Iv1ZDvTLXdWyEKToav/rDlTTqrUPj10VDHTOJZfEJynpuyvA/tWm bM8/rRFMEzmQE88qLmvTRj05zs9zC9z6wSWKZUoVLjaCwm34Nv0bDx7Cvw/gUOPMf6s1 +eMhb+Y5N6/ExaZLBAxdyasKOeiqsj2Ay8h4KQK6VTJ8V1/Qm53c5vaDAQm7UUe5KsTP E0DQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be3-v6si10506549plb.474.2018.05.15.00.48.19; Tue, 15 May 2018 00:48:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbeEOHqj (ORCPT + 99 others); Tue, 15 May 2018 03:46:39 -0400 Received: from verein.lst.de ([213.95.11.211]:40499 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219AbeEOHqi (ORCPT ); Tue, 15 May 2018 03:46:38 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id CA18770914; Tue, 15 May 2018 09:50:55 +0200 (CEST) Date: Tue, 15 May 2018 09:50:55 +0200 From: Christoph Hellwig To: Johannes Thumshirn Cc: Keith Busch , Sagi Grimberg , Christoph Hellwig , Linux NVMe Mailinglist , Linux Kernel Mailinglist , Hannes Reinecke Subject: Re: [PATCH 3/5] nvme: call nvmf_create_ctrl before checking for duplicate assignment Message-ID: <20180515075055.GB23659@lst.de> References: <20180515074043.22843-1-jthumshirn@suse.de> <20180515074043.22843-4-jthumshirn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180515074043.22843-4-jthumshirn@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 09:40:41AM +0200, Johannes Thumshirn wrote: > In nvmf_dev_write we did check if the /dev/nvme-fabrics device node's > private data is already set and then create a controller data > structure afterwards. The private data is protected by the > nvmf_dev_mutex, but there is no need to hold it while calling > nvmf_create_ctrl(). > > This also reduces the number of lockdep complaints in the 'nvme > connect' with fcloop scenario. Something looks seriously fishy in fcloop. How do we and up in a RCU critical section here? In general it seems like fc loop needs to offload any I/O to a workqueue just like nvme-loop does, but even then I can't see how that is going to cause an issue in this area.