From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1052EDEC45 for ; Wed, 13 Sep 2023 11:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240477AbjIMLfl (ORCPT ); Wed, 13 Sep 2023 07:35:41 -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 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.