From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, neilb@suse.de, brauner@kernel.org
Cc: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v1] SUNRPC: Remove BUG_ON call sites
Date: Fri, 22 Sep 2023 15:19:27 -0400 [thread overview]
Message-ID: <ccac5c0333b60cb37309a15f18f8592c19d73879.camel@kernel.org> (raw)
In-Reply-To: <169504668787.134583.4338728458451666583.stgit@manet.1015granger.net>
On Mon, 2023-09-18 at 10:18 -0400, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> There is no need to take down the whole system for these assertions.
>
> 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.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> net/sunrpc/svc.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> Let's start here. Comments?
>
>
> 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);
>
> /*
> - * 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);
>
> cache_clean_deferred(serv);
>
>
>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-09-22 19:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 14:18 [PATCH v1] SUNRPC: Remove BUG_ON call sites Chuck Lever
2023-09-18 14:26 ` Christian Brauner
2023-09-19 0:02 ` NeilBrown
2023-09-19 14:56 ` Chuck Lever III
2023-09-22 19:19 ` Jeff Layton [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-19 15:35 Chuck Lever
2023-09-19 22:11 ` NeilBrown
2024-06-27 12:53 ` Donald Buczek
2024-08-23 3:35 ` Li Lingfeng
2024-08-23 19:15 ` Chuck Lever
2024-08-23 19:59 ` Chuck Lever
2024-08-24 2:38 ` Li Lingfeng
2024-08-24 1:03 ` Li Lingfeng
2024-08-24 2:29 ` Li Lingfeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccac5c0333b60cb37309a15f18f8592c19d73879.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=brauner@kernel.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox