drm/i915: use i915_gem_object_put_unlocked() after releasing mutex
Subsystems (2)
PATCH v2 1/1 drm/i915: use i915_gem_object_put_unlocked() after releasing mutex
The exit path in intel_overlay_put_image_ioctl() first unlocks the struct_mutex, then drops its reference to 'new_bo' by calling i915_gem_object_put(). As it isn't holding the mutex at this point, this should be i915_gem_object_put_unlocked().
This was previously correct but got splatted in the recent s/drm_gem_object_unreference/i915_gem_object_put/ where the _unlocked suffix was lost in this one case.
v2: don't bother fixing whitespace glitch [Chris Wilson]
Chris can do it next time he touches gem_evict.c ;)
--- drivers/gpu/drm/i915/intel_overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_overlay.c +1 -1
@@ -1219,7 +1219,7 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data, out_unlock:mutex_unlock (&dev->struct_mutex);drm_modeset_unlock_all (dev); -i915_gem_object_put (new_bo); +i915_gem_object_put_unlocked (new_bo); out_free:kfree (params);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Dave Gordon
The exit path in
intel_overlay_put_image_ioctl()first unlocks thestruct_mutex, then drops its reference to 'new_bo' by callingi915_gem_object_put(). As it isn't holding the mutex at this point, this should bei915_gem_object_put_unlocked().This was previously correct but got splatted in the recent s/drm_gem_object_unreference/i915_gem_object_put/ where the
_unlockedsuffix was lost in this one case.v2: don't bother fixing whitespace glitch [Chris Wilson]
Chris can do it next time he touchesgem_evict.c;)
He plans to, it is drm/i915: Release vma when the handle is closed, where we don't need to touch the obj in that loop any more. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Dave Gordon
The exit path in
intel_overlay_put_image_ioctl()first unlocks thestruct_mutex, then drops its reference to 'new_bo' by callingi915_gem_object_put(). As it isn't holding the mutex at this point, this should bei915_gem_object_put_unlocked().This was previously correct but got splatted in the recent s/drm_gem_object_unreference/i915_gem_object_put/ where the
_unlockedsuffix was lost in this one case.
Quoted 6 lines
v2: don't bother fixing whitespace glitch [Chris Wilson]
Chris can do it next time he touchesgem_evict.c;)Fixes f8c417cd drm/i915: Rename drm_gem_object_unreference in preparation ...Signed-off-by Dave Gordon <[email protected]>Reviewed-by Chris Wilson <[email protected]>
CI doesn't provide any coverage of this, so pushed. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx