blob: 990fd85a4473ea250f12b361081bee0c14362f37 [file] [log] [blame]
Subject: [PATCH] xserver: Fix dri2 race
The is a race where the client disappears after submitting the swapbuffers
but before completing the request. Don't attend the client if it is gone.
---
hw/xfree86/dri2/dri2.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 5cc9068..d03d082 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -220,7 +220,9 @@ DRI2SwapLimit(DrawablePtr pDraw, int swap_limit)
if (pPriv->target_sbc == -1 && !pPriv->blockedOnMsc) {
if (pPriv->blockedClient) {
- AttendClient(pPriv->blockedClient);
+ if ((pPriv->blockedClient->clientState != ClientStateGone) &&
+ (pPriv->blockedClient->clientState != ClientStateInitial))
+ AttendClient(pPriv->blockedClient);
pPriv->blockedClient = NULL;
}
}
--
1.7.7.3