Re: [Intel-gfx] [PATCH libdrm] intel: Serialize drmPrimeFDToHandle with struct_mutex

2015-08-21 Thread Damien Lespiau
On Fri, Jul 24, 2015 at 11:51:01AM +0100, Chris Wilson wrote: On Fri, Jul 24, 2015 at 11:22:34AM +0200, Michał Winiarski wrote: From: Rafał Sapała rafal.a.sap...@intel.com It is possible to hit a race condition in create_from_prime, when trying to import a BO that's currently being

[Intel-gfx] [PATCH libdrm] intel: Serialize drmPrimeFDToHandle with struct_mutex

2015-07-24 Thread Michał Winiarski
From: Rafał Sapała rafal.a.sap...@intel.com It is possible to hit a race condition in create_from_prime, when trying to import a BO that's currently being freed. In case of prime sharing we'll succesfully get a handle, but fail on get_tiling call, potentially confusing the caller (and requiring

Re: [Intel-gfx] [PATCH libdrm] intel: Serialize drmPrimeFDToHandle with struct_mutex

2015-07-24 Thread Chris Wilson
On Fri, Jul 24, 2015 at 11:22:34AM +0200, Michał Winiarski wrote: From: Rafał Sapała rafal.a.sap...@intel.com It is possible to hit a race condition in create_from_prime, when trying to import a BO that's currently being freed. In case of prime sharing we'll succesfully get a handle, but