Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3304440rdb; Wed, 13 Sep 2023 08:12:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzabmdPchS3LxBXhIktRVnIp6O4NmMAkUGG1U2pkNFwkMCHjlFrDwko6TVaIfAz5fxNO0d X-Received: by 2002:a05:6a00:2482:b0:68e:3012:fd69 with SMTP id c2-20020a056a00248200b0068e3012fd69mr3410483pfv.30.1694617937376; Wed, 13 Sep 2023 08:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694617937; cv=none; d=google.com; s=arc-20160816; b=rtY+8kCtfAos+iA/nJ+xsggGKQU6iTeE+FLn0mEVQz6qPHkU/AT0MEfvh2gK/FIUUo +Z1hkQXCeeFwDJgVjv982/SGAsGttp5IwUwMPGvutlRvmtfkm7u7CZlGHFBAuQM8qewI kZgZT9xhFFFKYdnAzLtMFucFNBMyQzplKJGPq1Udv7XHj2lf1VMnbzoROK5s5xE04w6A ac5LBif08kRvbe/cl3eVX0HcLcsCYRO3WdyHAAQS244flkcEldrXVIBNagt5qiTo3VDG 05lysBVVXdfTws1g88piHlwI1P1xAVsD+LkjleUoJTMqsE94iJ9xjETzUn/T6W6GAWL3 7fpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=Jw7VrG1wDiIT9Y0JnImTHxBRJ2Bt8wke3di/er57Oyk=; fh=QEtkQlQ2wxfPunR/sdnMJ/Kz9teX9MHfVNEhOVSuF2Q=; b=lGfC6hLwZpcIv1y6b4DHbrSz5cMLiMbnVIwbwV8sjGIRlIKZrlr3MdiFQJsZMAs5dQ XM7qpwScT9zW1UPDYTCM1eyB7JNDs7wRxfviySelwqzkSBHNkgsnT8ejDX7MgKRKbXKq dJ8xkqmvttcLKtPV7FgKNQ9OypvpViqjCZ8wUiza+pvX6NVicA9cCyCefyCLwuzzU9Zh ob7kzRXbfztxmbdPLs+B44zVKOCGzM+h0LJd9wlZ0Yq/M4dfWQfq0h0QpGeBjSMfpfn9 Wwt751tfLCssnX0jljOMFppWh6/TZPGE9wx8JNxzy8Xe9ahuo83gKsexNQYsYI6YQbGI tpHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rrRJ5Wwy; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k131-20020a628489000000b006901f2f2577si494920pfd.380.2023.09.13.08.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 08:12:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rrRJ5Wwy; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B0DB1807746E; Wed, 13 Sep 2023 04:58:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240618AbjIML6q (ORCPT + 99 others); Wed, 13 Sep 2023 07:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240596AbjIML6q (ORCPT ); Wed, 13 Sep 2023 07:58:46 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 283891996 for ; Wed, 13 Sep 2023 04:58:42 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DC877218E3; Wed, 13 Sep 2023 11:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1694606320; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Jw7VrG1wDiIT9Y0JnImTHxBRJ2Bt8wke3di/er57Oyk=; b=rrRJ5Wwycc/qfyFFS7rpx6l8AM9MmEFFLEKwB1N11nCDaUYb6PQGnFw+5qp7I6dpFJ+qJp 12SpqKJB2OZh2jHu1ZzQWM4VtBIvFx4UveWSMNfVARmP2jRhM6oynspuOipGTs+EmWfPfL E2qdJnCKU08HxZgWeiGuPfetumgeEfs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1694606320; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Jw7VrG1wDiIT9Y0JnImTHxBRJ2Bt8wke3di/er57Oyk=; b=QC90yT4DjDa3rPfezZsWpPsgjo2Azp8/Vdk/viCDvJRM5xa3G2QFpd92QizVz58tNHJ6gB BzuzlKaSgg7FuYCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D225F13582; Wed, 13 Sep 2023 11:58:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ABUYM/CjAWVpFgAAMHmgww (envelope-from ); Wed, 13 Sep 2023 11:58:40 +0000 Date: Wed, 13 Sep 2023 13:59:18 +0200 From: Daniel Wagner To: Christoph Hellwig Cc: 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: References: <20230829091350.16156-1-dwagner@suse.de> <20230829091350.16156-5-dwagner@suse.de> <20230905065032.GC19701@lst.de> <20230913113519.GA1565@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913113519.GA1565@lst.de> 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 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 04:58:47 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 groat.vger.email On Wed, Sep 13, 2023 at 01:35:19PM +0200, Christoph Hellwig wrote: > 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. nvmet_fc_handle_fcp_rqst() if (tgtport->pe) fod->req.port = tgtport->pe->port; Not sure why this is there. Will test what happens when we just return an error when we don't have pe set. > 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. Okay, makes sense. I'll test this when I have access to my rig again tomorrow.