mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
DEVEL15-windows-hold-server-mutex-for-vol-list-20071223
LICENSE MIT When walking or modifying the cm_server_vols_t associated with a given cm_server_t the mutex must be held. Otherwise, races can occur. (cherry picked from commit b0bae13aec9acb944d5d6a64c11df857ffc40eb3)
This commit is contained in:
parent
50bf917efd
commit
efb0e9ebd8
@ -1905,8 +1905,6 @@ cm_GiveUpAllCallbacks(cm_server_t *tsp, afs_int32 markDown)
|
||||
tsp->downTime = osi_Time();
|
||||
}
|
||||
cm_ForceNewConnections(tsp);
|
||||
lock_ReleaseMutex(&tsp->mx);
|
||||
|
||||
/* Now update the volume status */
|
||||
for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
|
||||
for (i=0; i<NUM_SERVER_VOLS; i++) {
|
||||
@ -1924,6 +1922,7 @@ cm_GiveUpAllCallbacks(cm_server_t *tsp, afs_int32 markDown)
|
||||
}
|
||||
}
|
||||
}
|
||||
lock_ReleaseMutex(&tsp->mx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,6 @@ cm_PingServer(cm_server_t *tsp)
|
||||
cm_volume_t * volp;
|
||||
int i;
|
||||
|
||||
lock_ReleaseMutex(&tsp->mx);
|
||||
for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
|
||||
for (i=0; i<NUM_SERVER_VOLS; i++) {
|
||||
if (tsrvp->ids[i] != 0) {
|
||||
@ -148,7 +147,6 @@ cm_PingServer(cm_server_t *tsp)
|
||||
}
|
||||
}
|
||||
}
|
||||
lock_ObtainMutex(&tsp->mx);
|
||||
}
|
||||
} else {
|
||||
/* mark server as down */
|
||||
@ -170,7 +168,6 @@ cm_PingServer(cm_server_t *tsp)
|
||||
cm_volume_t * volp;
|
||||
int i;
|
||||
|
||||
lock_ReleaseMutex(&tsp->mx);
|
||||
for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
|
||||
for (i=0; i<NUM_SERVER_VOLS; i++) {
|
||||
if (tsrvp->ids[i] != 0) {
|
||||
@ -185,7 +182,6 @@ cm_PingServer(cm_server_t *tsp)
|
||||
}
|
||||
}
|
||||
}
|
||||
lock_ObtainMutex(&tsp->mx);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user