summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-10 21:50:45 -0700
committerOlivier Fourdan <ofourdan@redhat.com>2017-06-16 11:48:10 +0200
commit5040e998632770d30d5da1de0ee23b61b5f92666 (patch)
tree1cddc5e34c6a2cd1ee811c42f82a7b65d1eeb90c
parente3f08d5d6c09aa1425ea1362985312ab3cf84983 (diff)
dix: Remove clients from input and output ready queues after closing
Delay removing the client from these two queues until all potential I/O has completed in case we mark the client as ready for reading or with pending output during the close operation. Bugzilla: https://bugs.freedesktop.org/100957 Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Nick Sarnie <commendsarnex@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit d9e23ea4228575344e3b4c0443cecc5eb75356e4)
-rw-r--r--dix/dispatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 78ac095b1..0da431bf9 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3415,7 +3415,6 @@ CloseDownClient(ClientPtr client)
if (grabState != GrabNone && grabClient == client) {
UngrabServer(client);
}
- mark_client_not_ready(client);
BITCLEAR(grabWaiters, client->index);
DeleteClientFromAnySelections(client);
ReleaseActiveGrabs(client);
@@ -3444,8 +3443,9 @@ CloseDownClient(ClientPtr client)
if (ClientIsAsleep(client))
ClientSignal(client);
ProcessWorkQueueZombies();
- output_pending_clear(client);
CloseDownConnection(client);
+ output_pending_clear(client);
+ mark_client_not_ready(client);
/* If the client made it to the Running stage, nClients has
* been incremented on its behalf, so we need to decrement it