Patch "drm: Reject DRI1 hw lock ioctl functions for kms drivers" has been added to the 3.10-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm: Reject DRI1 hw lock ioctl functions for kms drivers
to the 3.10-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-reject-dri1-hw-lock-ioctl-functions-for-kms-drivers.patch
and it can be found in the queue-3.10 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
da168d81b44898404d281d5dbe70154ab5f117c1Mon Sep 17 00:00:00 2001
From: Daniel Vetter <[email protected]>
Date: Tue, 23 Jun 2015 11:34:21 +0200
Subject: drm: Reject DRI1 hw lock ioctl functions for kms drivers
From: Daniel Vetter <[email protected]>
commit da168d81b44898404d281d5dbe70154ab5f117c1 upstream.
I've done some extensive history digging across libdrm, mesa and xf86-video-{intel,nouveau,ati}. The only potential user of this with kms drivers I could find was ttmtest, which once used drmGetLock still. But that mistake was quickly fixed up. Even the intel xvmc library (which otherwise was really good with using dri1 stuff in kms mode) managed to never take the hw lock for dri2 (and hence kms).
Hence it should be save to unconditionally disallow this.
--- drivers/gpu/drm/drm_lock.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_lock.c +6 -0
@@ -58,6 +58,9 @@ int drm_lock(struct drm_device *dev, voistruct drm_master *master = file_priv->master;int ret =0 ; +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -EINVAL ; + ++file_priv->lock_count;if (lock->context ==DRM_KERNEL_CONTEXT ) {
@@ -151,6 +154,9 @@ int drm_unlock(struct drm_device *dev, vstruct drm_lock *lock = data;struct drm_master *master = file_priv->master; +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -EINVAL ; +if (lock->context ==DRM_KERNEL_CONTEXT ) {DRM_ERROR ("Process %d using kernel context %d\n" ,task_pid_nr (current), lock->context);
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/drm-reject-dri1-hw-lock-ioctl-functions-for-kms-drivers.patch