mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
FBSD: StopListener glocking fixup
afs_osi_Sleep requires the glock (so that it can sleep on it); we dropped the glock earlier in osi_StopListener because soshutdown and soclose can sleep, but we must (unconditionally!) acquire it for our loop waiting on rxk_ListenerPid. Change-Id: I38c3ab6689a6af7f1693bd3c8348068ee280e530 Reviewed-on: http://gerrit.openafs.org/3549 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
ad0b390ec5
commit
28032bc1c1
@ -108,11 +108,14 @@ osi_StopListener(void)
|
||||
bzero(&dvec, sizeof(dvec));
|
||||
dvec.iov_base = &c;
|
||||
dvec.iov_len = 1;
|
||||
/* afs_osi_Sleep requires the GLOCK */
|
||||
AFS_GLOCK();
|
||||
while(rxk_ListenerPid) {
|
||||
afs_warn("waiting for rxk_ListenerPid to die\n");
|
||||
osi_NetSend(rx_socket, &taddr, &dvec, 1, 1, 0);
|
||||
afs_osi_Sleep(&rxk_ListenerPid);
|
||||
}
|
||||
AFS_GUNLOCK();
|
||||
/* in theory, we are now the only people doing anything with rx_socket */
|
||||
soclose(rx_socket);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user