Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3176588rdb; Wed, 13 Sep 2023 04:43:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2Bmt5GYAFa/umtAdxjAm0vkUtXDNTlgn4coqdZumzAdnM7bmb24uHa33xrRV5yV7T52Iq X-Received: by 2002:a05:6808:20a0:b0:3a8:472b:febf with SMTP id s32-20020a05680820a000b003a8472bfebfmr3002775oiw.21.1694605422340; Wed, 13 Sep 2023 04:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694605422; cv=none; d=google.com; s=arc-20160816; b=fnhhxqrO4OuxABcqRvC3cFnluYkFjVh6d92Hyyc3XZZokj0Xw4LPiRPeyXdPeBaTME ixH4A9vf2gInJwntz+g4uAp+VktJROpmINl+Vj4tFiTnDVfVt1mQJPP21hYx41U7lRma +VsMeTQQPPrX//Qr6tklhIGiDd9CwPjt2E/eiQLNQZtVWwmKC0VyH2bQtXPMVZyfc5pL nZIk4+uEOHUgiK3kUHRV7ESMQhtn+CMV98ETzdYG5en3+s8D5NukBFtiTrrLV1KR/Gmz TlZBaZ1D8Rz5EUzKnt8SkzbLENu492QeUfR9oPjNLXJNdRKujzUIyHr53CtDgO6Ci0Bp ezQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=LYOunGE77Xv0P7LB2mtrAgx02xhgVD94qWi7GJJIUHo=; fh=QM5gn2EcP7f6hZ6/GnRXSiVBBA+FmDYaz5d0PpL/oxs=; b=ArMs/yrKg4r0EGqK7a/eUDb7RmllHy6o1n5i8al6BxGYVhs7U+GyZLLrFp6s5TgftM nOo8JAkOayGXMCBtfrvd5Td5WhfnY+ddqR2chk08FTMQOj5b2OLlhDFbnqTUXKNaBFjF CKNzLGS8FHBhcvIreEZ+y7rD4mXTxHBNnDKbx48izEehPdQzVHAoj7mMoBD0flSZNo4u Uf7iQMy1cNfzY2gh+qw/Vx0MvxyPXCie5uCmhe6Zc333xmevkB5/16tVC42hze0swqWm +ZCB3MgdtBmLJcjOIDYHGxYG26PhZfj7ge+aXxigaJ6lTyRG7SoYndrbMjR7W8hvUM8v 9RQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k186-20020a6384c3000000b005578c6a7672si10068953pgd.90.2023.09.13.04.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 04:43:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2AC6880A0DD1; Wed, 13 Sep 2023 04:35:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240466AbjIMLfk (ORCPT + 99 others); Wed, 13 Sep 2023 07:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240318AbjIMLf2 (ORCPT ); Wed, 13 Sep 2023 07:35:28 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6FA51BC3 for ; Wed, 13 Sep 2023 04:35:23 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id E551D68AA6; Wed, 13 Sep 2023 13:35:19 +0200 (CEST) Date: Wed, 13 Sep 2023 13:35:19 +0200 From: Christoph Hellwig To: Daniel Wagner Cc: Christoph Hellwig , g@flourine.lan, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Hannes Reinecke , Sagi Grimberg , Jason Gunthorpe , James Smart , Chaitanya Kulkarni Subject: Re: [RFC v1 4/4] nvmet-discovery: do not use invalid port Message-ID: <20230913113519.GA1565@lst.de> References: <20230829091350.16156-1-dwagner@suse.de> <20230829091350.16156-5-dwagner@suse.de> <20230905065032.GC19701@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 13 Sep 2023 04:35:41 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email So that's interesting. But what I'm mostly worried about is how the nvmet kernel code allows a request without ->port to progress to the actual command handler. We should never allow a command to get that far if ->port is NULL, and should not allow to clear ->port while commands are still handled.