mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
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. Change-Id: I545960fb0eb0d5151baa7e06e2758cdeaf0885da Reviewed-on: http://gerrit.openafs.org/5447 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
e6c04df407
commit
6196abf3c8
28
src/rx/rx.c
28
src/rx/rx.c
@ -1808,6 +1808,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
|
/* if server is restarting( typically smooth shutdown) then do not
|
||||||
* allow any new calls.
|
* allow any new calls.
|
||||||
*/
|
*/
|
||||||
@ -1823,20 +1837,8 @@ rxi_ServerProc(int threadID, struct rx_call *newcall, osi_socket * socketp)
|
|||||||
|
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
USERPRI;
|
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;
|
tservice = call->conn->service;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user