[Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Jul 22 09:17:24 PDT 2015
On 07/22/2015 05:05 PM, Daniel Vetter wrote:
> On Wed, Jul 22, 2015 at 04:46:00PM +0100, Tvrtko Ursulin wrote:
>> But also, why it is even necessary to drop the mutex here?
>
> Locking inversion with our own pagefault handler. Happens since at least
> mesa can return gtt mmaps to gl clients, which can then in turn try to
> upload that with pwrite somewhere else. Also userspace could be just plain
> nasty and try to deadlock the kernel ;-)
Yeah blame userspace. ;D
> Dropping the struct_mutex is SOP for the copy_from/to_user slowpath.
I suspected something like that but did not feel like thinking too much.
:) When encountering unusual things like dropping and re-acquiring locks
I expect to see comments explaining it.
Regards,
Tvrtko
More information about the Intel-gfx
mailing list