Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2973673rdb; Fri, 22 Sep 2023 13:55:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtyRYGp38c+1Yzx5ukx4EwHMaCCnwm1AdzyPdDZHqL5EPIP9ZqvIi+nUZft1pxYynHTY07 X-Received: by 2002:a17:902:7c95:b0:1c1:fafd:d169 with SMTP id y21-20020a1709027c9500b001c1fafdd169mr501199pll.3.1695416138144; Fri, 22 Sep 2023 13:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695416138; cv=none; d=google.com; s=arc-20160816; b=eMbNEbFMwf58YGmu5jKzQ+Skfr63FyrPTcCGLT00Y1OkcRn6E5r42mbknY3pQa8JRa oHwTJYlNDGrmZUKiMNYIbD3/ie/y5UldiMxIQAJuJYb1+fXQcc2RHWBpjq8TJy1YJyhw EqvAhLeT2fG4hS+rt1y612z2qLzrOl5TrirhGrbFvUyn5tq7roWYoVX5eRXq5BDxlRi0 /LaL2nUhu6RhTlE/xd+oa0KxbV0puFkF5k43S1VysPDZwA+iDXHtaFy60g4s++pBtsB1 BgkCLT0AXu8zltRt0lwGguF6rsM1JSmh3WnYrxvIhEp0gGSZYuVpcqoCLzVhmmLfNIYN tZdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=s1Q21gA7CyXdUgUVuEdigUOQ70co4bp1/JJ0n6++XRU=; fh=P9jbMOOJ8ZXR3Z8kwaxzU5cGub/3RS6+1GnCrpAvBOo=; b=BBr8x1WDrWdH8W0jeM9ZqmCP19umVLGvLVQ87TsWCQg0K3jQKfixiM4qrWrxTOQCBP 3ZLc3ZmTQBzsW78C9DcQLcJj4r+rAM2MCRxzD3BIIskroSZd8ukQK2inwMTainf0Szvz GU800aGZpLsDTveQyd1e2NHMNwFrfaeHH4BvBLhxqgh/3tiav9N6IVQ7GU/B+2YqionS sCADQSqaw+s04HAGwRjQmXcAQTjM4OYG+eyjFI0qbzsqBohJ5u3TrixjyNsUNkhURRiB kCY0NMkySzXVS0lMJexqxeBc2Mbv+uSmjPjv2w+laR9XhqfIkTltsm2YZENo6g8Q6R83 hNew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bz9EHguH; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id d8-20020a170903230800b001b7f4696a2csi4552238plh.347.2023.09.22.13.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 13:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bz9EHguH; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 30AF98370DBF; Fri, 22 Sep 2023 12:19:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231283AbjIVTTg (ORCPT + 99 others); Fri, 22 Sep 2023 15:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231226AbjIVTTf (ORCPT ); Fri, 22 Sep 2023 15:19:35 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2784A3 for ; Fri, 22 Sep 2023 12:19:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFFBAC433C7; Fri, 22 Sep 2023 19:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695410369; bh=dXOqTbOgPd5IRpEfDgGxOxnKP4GfARC7wgQHeofg7R4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Bz9EHguHUemOzgfTkyfX3KOJ7NZGGTw+quOWUWD9NyxIieG+vfX3KvLTLE+Lo4w42 K1VtDADTIARyJxX4pifliDEXh/V5Y4IVyGSyzGCKh2BoiZ06h9K5a6/9ogrbYUrzh1 2amJGf0oK3V1itkCmJBh9F3AZ60nTY8BhJMKLc9arzm7tI5EqeOB4TOF9jgJRtGdCT NB8GpIvQFkrINEVxoeAF+x0YfDzywfuas+ngbVv+P/3sMpFSiUQFdLn0fkZL31Ft4u uUpSKU5etjgDlQLzPrEAjXwAYbqr/fcBTWJB3e3Vm2Nsf+rZxW8zaJSEZpEixtMzKh IT5loXBqqXLCQ== Message-ID: Subject: Re: [PATCH v1] SUNRPC: Remove BUG_ON call sites From: Jeff Layton To: Chuck Lever , neilb@suse.de, brauner@kernel.org Cc: Chuck Lever , linux-nfs@vger.kernel.org Date: Fri, 22 Sep 2023 15:19:27 -0400 In-Reply-To: <169504668787.134583.4338728458451666583.stgit@manet.1015granger.net> References: <169504668787.134583.4338728458451666583.stgit@manet.1015granger.net> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 12:19:42 -0700 (PDT) On Mon, 2023-09-18 at 10:18 -0400, Chuck Lever wrote: > From: Chuck Lever >=20 > There is no need to take down the whole system for these assertions. >=20 > I'd rather not attempt a heroic save here, as some bug has occurred > that has left the transport data structures in an unknown state. > Just warn and then leak the left-over resources. >=20 > Signed-off-by: Chuck Lever > --- > net/sunrpc/svc.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) >=20 > Let's start here. Comments? >=20 >=20 > diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c > index 587811a002c9..11a1d5e7f5c7 100644 > --- a/net/sunrpc/svc.c > +++ b/net/sunrpc/svc.c > @@ -575,11 +575,14 @@ svc_destroy(struct kref *ref) > timer_shutdown_sync(&serv->sv_temptimer); > =20 > /* > - * The last user is gone and thus all sockets have to be destroyed to > - * the point. Check this. > + * Remaining transports at this point are not expected. > */ > - BUG_ON(!list_empty(&serv->sv_permsocks)); > - BUG_ON(!list_empty(&serv->sv_tempsocks)); > + if (unlikely(!list_empty(&serv->sv_permsocks))) > + pr_warn("SVC: permsocks remain for %s\n", > + serv->sv_program->pg_name); > + if (unlikely(!list_empty(&serv->sv_tempsocks))) > + pr_warn("SVC: tempsocks remain for %s\n", > + serv->sv_program->pg_name); > =20 > cache_clean_deferred(serv); > =20 >=20 >=20 Reviewed-by: Jeff Layton