[PATCH] drm: Use global_mutex to serialise open/lastclose

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 9 10:00:46 PDT 2010


On Sun,  8 Aug 2010 09:37:24 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Dave Airlie:
>   I might be missing something, but what stops the race with something
>   reopening while we are in lastclose now?
> 
> The global_mutex which appears to fill this role is only taken inside
> the drm_stub_open() and not drm_open() itself. As that mutex appears to
> serve no other role, retask it to serialise open/lastclose.

This patch was just wrong. The ordering is drm_stub_open() -> drm_open()
so open/lastclose are currently serialised using drm_global_mutex.
-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list