mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
viced: Check for HOSTDELETED in stillborn check
h_FindClient_r checks the connection rock for a client object twice. First it sees if we already have a client object, and if we don't, we effectively create one (or find a suitable one). Then we check again, to see if someone else set the rock while we were creating a client structure. Currently, the first check checks if client->host->hostFlags has HOSTDELETED set, but the second check does not. So, if the host associated with the client has been deleted by someone else, currently we will unnecessarily log a "stillborn client" message, and we will continue to use the deleted host. If the host continues to be held by someone, we will run into the same situation repeatedly on future requests until all of the host references go away. To fix this, also ignore HOSTDELETED clients when performing the stillborn race check. Change-Id: Id72e83cb55b99a686d4179905116592e80eb9ac7 Reviewed-on: http://gerrit.openafs.org/5614 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
13a4642458
commit
b5a153fb75
@ -2542,7 +2542,8 @@ h_FindClient_r(struct rx_connection *tcon)
|
|||||||
*/
|
*/
|
||||||
oldClient = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
|
oldClient = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
|
||||||
if (oldClient && oldClient != client && oldClient->sid == rxr_CidOf(tcon)
|
if (oldClient && oldClient != client && oldClient->sid == rxr_CidOf(tcon)
|
||||||
&& oldClient->VenusEpoch == rxr_GetEpoch(tcon)) {
|
&& oldClient->VenusEpoch == rxr_GetEpoch(tcon)
|
||||||
|
&& !(oldClient->host->hostFlags & HOSTDELETED)) {
|
||||||
char hoststr[16];
|
char hoststr[16];
|
||||||
if (!oldClient->deleted) {
|
if (!oldClient->deleted) {
|
||||||
/* if we didn't create it, it's not ours to put back */
|
/* if we didn't create it, it's not ours to put back */
|
||||||
|
Loading…
Reference in New Issue
Block a user