Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5246579rwl; Tue, 11 Apr 2023 02:36:52 -0700 (PDT) X-Google-Smtp-Source: AKy350bpXbmaAcckcQWc/8dJG6kf3OnhvnQCfjTfe2Aa1T5tTXe/OGtpKbHtcktI+X/0dyeMEL7J X-Received: by 2002:a17:907:1686:b0:930:f953:962c with SMTP id hc6-20020a170907168600b00930f953962cmr12465267ejc.1.1681205812132; Tue, 11 Apr 2023 02:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681205812; cv=none; d=google.com; s=arc-20160816; b=sJVZX3Ed8Qr+ldWblw8GmoBSGAw2BAHkWXK8rPEhmfD6USN6y61rwtcfjWv36K4CUr L6dXJc2G/HdWGPi0RaaBoqMxg74WGtvkxSLD2RFERLBuu5ne69+C6c7aEsSW3atutXqG I08wIf2tNlKS3M/sRTnnjjXEiWgTPmJKxAbU7uzsrOvYpcMOKYhmZkEANK3nTsYhQMTK NHyTCq7Ztq6x4hqq7C73nsLanib746dcnKnrJpoFBauecmNaE+yA2CxnPrZmBipe9pBy /d1rhAtZoRKHri7gzYFnArsNP80NRqhyNwqJKFCl8I8Le8RRsoNrg0veITFcfhTBAhPF QigA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=NfxBQ+YwCQT4C500tsTvYDqFoF6jclwkqD6YJhX2o+Y=; b=qsZFnSslr4rhWyijWekpfzSNHjumU+P5IGN9kXo9Q9ahyr3UB2NNuhW4X/nDpXzxcf Ey8y8LrgLP19+5uYl/WVRD/+lGSW6MxFS3qIaGptvDWKX/0mk3gszvw4JQQMJKBjjr4H R3EA86mmyz7Vui09ohlN4kmXZiY9KeAEU5xA55owaltCtC6vIukW7ga3CCY/nqn8dr9T XBk+4OSj7Gzvq6nqhNuTV2GfIwCFuIXApD63wkLteLzZhsAP2erc3d2FD0zaTlAsr/4o 8ny3LLsKq/NaFQChHQWsaWbMSKudBYyK28tle6vMeEbnZbpddkNnFb0z7zaLCj4EyXxC mbLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=aRju6PIF; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=SFje4ilR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa36-20020a17090786a400b0094a776a0d10si1685865ejc.752.2023.04.11.02.36.27; Tue, 11 Apr 2023 02:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=aRju6PIF; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=SFje4ilR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229486AbjDKJWQ (ORCPT + 99 others); Tue, 11 Apr 2023 05:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjDKJWP (ORCPT ); Tue, 11 Apr 2023 05:22:15 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C70601BF0 for ; Tue, 11 Apr 2023 02:22:14 -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-out2.suse.de (Postfix) with ESMTPS id 78E511FE0B; Tue, 11 Apr 2023 09:22:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681204933; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NfxBQ+YwCQT4C500tsTvYDqFoF6jclwkqD6YJhX2o+Y=; b=aRju6PIFPD3pKpR8tDbD5zDwBZFsBMOLD46J7nUJ83WcKTvPzhX+FRxqLDqBfdkdCw7g1C BZZwYti1Q+tIFdUQCA0T/DworpqkvztHLXTOi+vuH+D/T+CP08xL0h0MRqZfdLNlYnLjt7 PvUIqeZJcRsaZ1LpmwnpZzNleaC2hwo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681204933; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NfxBQ+YwCQT4C500tsTvYDqFoF6jclwkqD6YJhX2o+Y=; b=SFje4ilRGflBpNnPl4rhLMeUVaOidFApoeujep2m/O+pCxCYiLs65d7nOEVXdsLvh58Ghd 1+eekIchjOkpVVBw== 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 6A97D13519; Tue, 11 Apr 2023 09:22:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EsEGGsUmNWQQJgAAMHmgww (envelope-from ); Tue, 11 Apr 2023 09:22:13 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Sagi Grimberg , James Smart , Chaitanya Kulkarni , Daniel Wagner Subject: [PATCH] rvmet-fcloop: Remove remote port from list when unlinking Date: Tue, 11 Apr 2023 11:22:09 +0200 Message-Id: <20230411092209.12719-1-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The remote port is never removed from fcloop_nports list. During module unloading it's possible to end up an busy loop in fcloop_exit, because the remote port is found in the list and thus we will never progress. The kernel log will be spammed with nvme_fcloop: fcloop_exit: Failed deleting remote port nvme_fcloop: fcloop_exit: Failed deleting target port Signed-off-by: Daniel Wagner --- drivers/nvme/target/fcloop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c index 5c16372f3b53..1e53c8fe4b95 100644 --- a/drivers/nvme/target/fcloop.c +++ b/drivers/nvme/target/fcloop.c @@ -1352,6 +1352,8 @@ __unlink_remote_port(struct fcloop_nport *nport) nport->tport->remoteport = NULL; nport->rport = NULL; + list_del(&nport->nport_list); + return rport; } -- 2.40.0