SUNRPC: Remove BUG_ON call sites
PATCH v2 1/1 SUNRPC: Remove BUG_ON call sites
From: Chuck Lever <[email protected]>
[ Upstream commit 789ce196a31dd13276076762204bee87df893e53 ]
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.
---
v2: resend with signoff properly set as requested
v1: https://lkml.kernel.org/r/[email protected]
net/sunrpc/svc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
net/sunrpc/svc.c +5 -4
@@ -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);
Signature · 1 line
2.46.1
Greg KH
maintainerQuoted 10 lines · Dominique Martinet
From: Chuck Lever <[email protected]>
[ Upstream commit
789ce196a31dd13276076762204bee87df893e53]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.
Quoted 8 lines
Reviewed-by NeilBrown <[email protected]>Reviewed-by Jeff Layton <[email protected]>Signed-off-by Chuck Lever <[email protected]>Signed-off-by Dominique Martinet <[email protected]>---
v2: resend with signoff properly set as requested
v1: https://lkml.kernel.org/r/[email protected]
Thanks, now queued up.
greg k-h