Commit 0033d731 authored by Chuck Lever's avatar Chuck Lever Committed by Wen Zhiwei
Browse files

SUNRPC: Remove BUG_ON call sites

stable inclusion
from stable-v6.6.60
commit d54afaef6570c277070c3cafe1ed73dcdc129e0a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB44K1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d54afaef6570c277070c3cafe1ed73dcdc129e0a



--------------------------------

commit 789ce196a31dd13276076762204bee87df893e53 upstream.

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.

Acked-by: default avatarChristian Brauner <brauner@kernel.org>
Reviewed-by: default avatarNeilBrown <neilb@suse.de>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent e94b638a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -577,11 +577,12 @@ 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));
	WARN_ONCE(!list_empty(&serv->sv_permsocks),
		  "SVC: permsocks remain for %s\n", serv->sv_program->pg_name);
	WARN_ONCE(!list_empty(&serv->sv_tempsocks),
		  "SVC: tempsocks remain for %s\n", serv->sv_program->pg_name);

	cache_clean_deferred(serv);