commit e43abdce964f5ed9689cf908af8c305b39a5dd36
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Wed Feb 3 09:54:46 2016 +0000

    dri2: Unblock Clients on Drawable release

added a call to AttendClient during drawable teardown, which also happens
as a result of client teardown. However, at that point the Client state
is no longer valid causing a possible explosion from AttendClient().

A simple workaround is to set the Client as ignored when tearing it
down, but we then also need to teach AttendClient not to dereference its
private pointer during teardown.

References: Jos van Wolput <wol...@onsneteindhoven.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94074
Testcase: dri2-race/client
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrj...@linux.intel.com>
Cc: Adam Jackson <a...@nwnk.net>
---
 dix/dispatch.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 53032dc..bfb5e1a 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3414,6 +3414,9 @@ CloseDownClient(ClientPtr client)
     }
 
     if (really_close_down) {
+        /* The client is going away, disable any AttendClient during shutdown 
*/
+        client->ignoreCount++;
+
         if (client->clientState == ClientStateRunning && nClients == 0)
             dispatchException |= dispatchExceptionAtReset;
 
-- 
2.7.0

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to