From: Derrick Brashear Date: Thu, 15 Sep 2011 17:48:31 +0000 (-0400) Subject: rx: arrange for Finalize to really stop running calls X-Git-Tag: upstream/1.6.1.pre1^2~23 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e07057bbde8e8c84cb78bc4f3bb22025b06735cd;p=packages%2Fo%2Fopenafs.git rx: arrange for Finalize to really stop running calls previously rxi_ServerProc would happily error a call once rx_tranquil was set, but keep calling ExecuteRequest. Reorder code so kernel shutdown attempts are processed first; then arrange if we are tranquil to not process the call further. Issue discovered by Chaskiel Grundman. Reviewed-on: http://gerrit.openafs.org/5447 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6196abf3c864f8cc6ab1efc6e5625a5cc68158bd) Change-Id: I00fad117ee8386fc29cd2423aa9fb7d89af55160 Reviewed-on: http://gerrit.openafs.org/6313 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 5d65528e5..7c1199e1d 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -1837,6 +1837,20 @@ rxi_ServerProc(int threadID, struct rx_call *newcall, osi_socket * socketp) } } +#ifdef KERNEL + if (afs_termState == AFSOP_STOP_RXCALLBACK) { +#ifdef RX_ENABLE_LOCKS + AFS_GLOCK(); +#endif /* RX_ENABLE_LOCKS */ + afs_termState = AFSOP_STOP_AFS; + afs_osi_Wakeup(&afs_termState); +#ifdef RX_ENABLE_LOCKS + AFS_GUNLOCK(); +#endif /* RX_ENABLE_LOCKS */ + return; + } +#endif + /* if server is restarting( typically smooth shutdown) then do not * allow any new calls. */ @@ -1852,20 +1866,8 @@ rxi_ServerProc(int threadID, struct rx_call *newcall, osi_socket * socketp) MUTEX_EXIT(&call->lock); USERPRI; + continue; } -#ifdef KERNEL - if (afs_termState == AFSOP_STOP_RXCALLBACK) { -#ifdef RX_ENABLE_LOCKS - AFS_GLOCK(); -#endif /* RX_ENABLE_LOCKS */ - afs_termState = AFSOP_STOP_AFS; - afs_osi_Wakeup(&afs_termState); -#ifdef RX_ENABLE_LOCKS - AFS_GUNLOCK(); -#endif /* RX_ENABLE_LOCKS */ - return; - } -#endif tservice = call->conn->service;