[Intel-gfx] [PATCH 07/26] Revert "drm/i915/gem: Split eb_vma into its own allocation"

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Jun 30 12:31:46 UTC 2020


On 30/06/2020 12:52, Maarten Lankhorst wrote:
> Op 29-06-2020 om 17:08 schreef Tvrtko Ursulin:
>>
>> On 23/06/2020 15:28, Maarten Lankhorst wrote:
>>> This reverts commit 0f1dd02295f35dcdcbaafcbcbbec0753884ab974.
>>> This conflicts with the ww mutex handling, which needs to drop
>>> the references after gpu submission anyway, because otherwise we
>>> may risk unlocking a BO after first freeing it.
>>
>> What is the problem here? eb_vma_array_put in eb_move_to_gpu? If so, could you just move this put to later in the sequence? I am simply thinking how to avoid controversial reverts. Because on the other hand I did not figure out what 0f1dd02295f35dcdcbaafcbcbbec0753884ab974 fixed in a few minutes I spent staring at the patch.
> 
> 
> We need to unlock before we unref to prevent a use-after-free in unlock, so freeing and releasing in eb_move_to_gpu() is too early. This means we only end up with 1 path for unlock, so it's fine to revert.

You are saying the reason 0f1dd02295f35dcdcbaafcbcbbec0753884ab974 was 
added for will not be there after your changes?

Regards,

Tvrtko


More information about the Intel-gfx mailing list