Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp332446rdh; Mon, 18 Dec 2023 23:26:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ1nGleYMgPZgKxN/z11E1lBmx5mV/iodup2aaYZnsqwv3e2RwICeiUCx9VDZ5nDPHAopQ X-Received: by 2002:a05:6214:d09:b0:67f:2cb3:88f0 with SMTP id 9-20020a0562140d0900b0067f2cb388f0mr6232405qvh.108.1702970817653; Mon, 18 Dec 2023 23:26:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702970817; cv=none; d=google.com; s=arc-20160816; b=rleC+fRgOpc/xoESFY6AGlR8eUklU8BmpSGDn+gnfzC/KJozHO4mKF/08XpanblK3X rgFLUdyZsi3sc62LX+JnozuzX4afzL5DsJKpC0Bx7LweUc6GDcbLpz/+MPHMexTUV48i K22FQAJh+tp3IYuBtHLfEgt/t2s+KJkkHxXgnF6diHRudZyKZ+3c3z59Uf0M4XPE7151 BnsQd6E0KN+cZg13wbci5j+gQaAW5+Bo2nFSpNPEYOCd8y+Ybp1AHA17XtJxKE52oO47 XUAsY0H2QQOVD6qe92aSLMGo+c6n06KH2x+282+ggQZ3UUY/S8LzdFL71rltjN9yK/vF Kf7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=TjL3rK5mqJOGP1HV7taqDEMc4rfDP37oIi42/AtoI7U=; fh=Ob8FspbdAv2lvfy9oyzcNqJb9FlG/MYewgbmONDw7dw=; b=dSUOUouDRnNzo45oNuZhC/Tb+p0sQ2w+nGOWfk50t9E+viCwgHZvgOYkIu0z8/AWhY 7ZPmEZaHJ2LGAmVsc9Yo//13oywH9NAR3B/Ohe8Q4xj1KSAQYwLcROFaUoQvr1/7BN4o U5bm/vyDypGqyPwjvEGeHeV38k7fx72Q9qfDnnyu9E4L6ektbGdUYisQrsEQz9e63vIO EKg3f1m2c3jRLsOuTF9knhJuKVRIASqU3/Vxz12EQdZlwSFk3mMhv3FIWWbd64GFSZSz QSxUskKsVuDgjt3Yz4BJQT/X+BvfJagU8PwcUshKTXMYrv9XiYlHEmlReVmnNLL0x6Zt HG4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Du0gm8oo; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Du0gm8oo; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel+bounces-4803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q5-20020a05621410e500b0067a49f7a0d5si25705713qvt.549.2023.12.18.23.26.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 23:26:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Du0gm8oo; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Du0gm8oo; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel+bounces-4803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6910C1C23621 for ; Tue, 19 Dec 2023 07:26:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4B8C13FFB; Tue, 19 Dec 2023 07:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Du0gm8oo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="N1IMFSch"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Du0gm8oo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="N1IMFSch" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFF2513FE3 for ; Tue, 19 Dec 2023 07:26:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F3BFD1F7A7; Tue, 19 Dec 2023 07:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702970797; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TjL3rK5mqJOGP1HV7taqDEMc4rfDP37oIi42/AtoI7U=; b=Du0gm8ooRodAnWordwCkHDQjLwiCZhH5VL7G1miM/NDP5tfOoKEZSM0RwXQLgXSGBK+ejk SuGq2fd4hlwqcviJ1wqBFLdoIlpWsqkuM+TsOynbVwiWK5NDyYdUuVKYDIY7lotUjc3ekJ CUquw5xxw+lDmuSBzKsKt1H5Wa+eNVw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702970797; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TjL3rK5mqJOGP1HV7taqDEMc4rfDP37oIi42/AtoI7U=; b=N1IMFSchUUXb9hPTVpcEUdhmnOh0g5Q221q3cKK1aKvgM7K/HvTK8fMepIIMaJLoRL6iBY 8pdQy2GKOqhhmvDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702970797; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TjL3rK5mqJOGP1HV7taqDEMc4rfDP37oIi42/AtoI7U=; b=Du0gm8ooRodAnWordwCkHDQjLwiCZhH5VL7G1miM/NDP5tfOoKEZSM0RwXQLgXSGBK+ejk SuGq2fd4hlwqcviJ1wqBFLdoIlpWsqkuM+TsOynbVwiWK5NDyYdUuVKYDIY7lotUjc3ekJ CUquw5xxw+lDmuSBzKsKt1H5Wa+eNVw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702970797; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TjL3rK5mqJOGP1HV7taqDEMc4rfDP37oIi42/AtoI7U=; b=N1IMFSchUUXb9hPTVpcEUdhmnOh0g5Q221q3cKK1aKvgM7K/HvTK8fMepIIMaJLoRL6iBY 8pdQy2GKOqhhmvDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2319013AA6; Tue, 19 Dec 2023 07:26:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8KlXBKxFgWVmcgAAD6G6ig (envelope-from ); Tue, 19 Dec 2023 07:26:36 +0000 Message-ID: <8fdbfb01-d50e-4198-b673-2a4c51417a81@suse.de> Date: Tue, 19 Dec 2023 08:26:36 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 05/16] nvmet-fcloop: Remove remote port from list when unlinking Content-Language: en-US To: Daniel Wagner , linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Keith Busch , James Smart References: <20231218153105.12717-1-dwagner@suse.de> <20231218153105.12717-6-dwagner@suse.de> From: Hannes Reinecke In-Reply-To: <20231218153105.12717-6-dwagner@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -6.89 X-Spamd-Result: default: False [-6.89 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-1.63)[92.64%]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.17)[-0.874]; RCPT_COUNT_SEVEN(0.00)[7]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Flag: NO On 12/18/23 16:30, Daniel Wagner wrote: > The remote port is removed too late from fcloop_nports list. Remove it > when port is unregistered. > > This prevents a busy loop in fcloop_exit, because it is possible 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 | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c > index c65a73433c05..ead349af30f1 100644 > --- a/drivers/nvme/target/fcloop.c > +++ b/drivers/nvme/target/fcloop.c > @@ -995,11 +995,6 @@ fcloop_nport_free(struct kref *ref) > { > struct fcloop_nport *nport = > container_of(ref, struct fcloop_nport, ref); > - unsigned long flags; > - > - spin_lock_irqsave(&fcloop_lock, flags); > - list_del(&nport->nport_list); > - spin_unlock_irqrestore(&fcloop_lock, flags); > > kfree(nport); > } > @@ -1357,6 +1352,8 @@ __unlink_remote_port(struct fcloop_nport *nport) > nport->tport->remoteport = NULL; > nport->rport = NULL; > > + list_del(&nport->nport_list); > + > return rport; > } > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald, Werner Knoblich