Skip to content

Commit d54afae

Browse files
chucklevergregkh
authored andcommitted
SUNRPC: Remove BUG_ON call sites
commit 789ce19 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: Christian Brauner <[email protected]> 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 27a58a1 commit d54afae

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

net/sunrpc/svc.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,12 @@ svc_destroy(struct kref *ref)
577577
timer_shutdown_sync(&serv->sv_temptimer);
578578

579579
/*
580-
* The last user is gone and thus all sockets have to be destroyed to
581-
* the point. Check this.
580+
* Remaining transports at this point are not expected.
582581
*/
583-
BUG_ON(!list_empty(&serv->sv_permsocks));
584-
BUG_ON(!list_empty(&serv->sv_tempsocks));
582+
WARN_ONCE(!list_empty(&serv->sv_permsocks),
583+
"SVC: permsocks remain for %s\n", serv->sv_program->pg_name);
584+
WARN_ONCE(!list_empty(&serv->sv_tempsocks),
585+
"SVC: tempsocks remain for %s\n", serv->sv_program->pg_name);
585586

586587
cache_clean_deferred(serv);
587588

0 commit comments

Comments
 (0)