Patch "drm: Release driver tracking before making the object available again" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm: Release driver tracking before making the object available again
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-release-driver-tracking-before-making-the-object-available-again.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
fe4600a548f2763dec91b3b27a1245c370ceee2aMon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Sat, 19 Aug 2017 13:05:58 +0100
Subject: drm: Release driver tracking before making the object available again
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Chris Wilson <[email protected]>
commit fe4600a548f2763dec91b3b27a1245c370ceee2a upstream.
This is the same bug as we fixed in commit f6cd7daecff5 ("drm: Release driver references to handle before making it available again"), but now the exposure is via the PRIME lookup tables. If we remove the object/handle from the PRIME lut, then a new request for the same object/fd will generate a new handle, thus for a short window that object is known to userspace by two different handles. Fix this by releasing the driver tracking before PRIME.
imported buffer list (v2)")
--- drivers/gpu/drm/drm_gem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_gem.c +3 -3
@@ -715,13 +715,13 @@ drm_gem_object_release_handle(int id, vostruct drm_gem_object *obj = ptr;struct drm_device *dev = obj->dev; +if (dev->driver->gem_close_object) + dev->driver->gem_close_object (obj, file_priv); +if (drm_core_check_feature (dev,DRIVER_PRIME ))drm_gem_remove_prime_handles (obj, file_priv);drm_vma_node_revoke (&obj->vma_node, file_priv->filp); -if (dev->driver->gem_close_object) - dev->driver->gem_close_object (obj, file_priv); -drm_gem_object_handle_unreference_unlocked (obj);return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/drm-release-driver-tracking-before-making-the-object-available-again.patch