This is a note to let you know that I've just added the patch titled
drm/i915: Check obj->vma_list under the struct_mutex
to the 3.19-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-i915-check-obj-vma_list-under-the-struct_mutex.patch
and it can be found in the queue-3.19 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 6c31a614c43ae274546f736b2a33363e149c3dc2 Mon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Thu, 12 Feb 2015 07:53:18 +0000
Subject: drm/i915: Check obj->vma_list under the struct_mutex
From: Chris Wilson <[email protected]>
commit 6c31a614c43ae274546f736b2a33363e149c3dc2 upstream.
When we walk the list of vma, or even for protecting against concurrent
framebuffer creation, we must hold the struct_mutex or else a second
thread can corrupt the list as we walk it.
Fixes regression from
commit d7f46fc4e7323887494db13f063a8e59861fefb0
Author: Ben Widawsky <[email protected]>
Date: Fri Dec 6 14:10:55 2013 -0800
drm/i915: Make pin count per VMA
References: https://bugs.freedesktop.org/show_bug.cgi?id=89085
Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpu/drm/i915/i915_gem_tiling.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -335,9 +335,10 @@ i915_gem_set_tiling(struct drm_device *d
return -EINVAL;
}
+ mutex_lock(&dev->struct_mutex);
if (i915_gem_obj_is_pinned(obj) || obj->framebuffer_references) {
- drm_gem_object_unreference_unlocked(&obj->base);
- return -EBUSY;
+ ret = -EBUSY;
+ goto err;
}
if (args->tiling_mode == I915_TILING_NONE) {
@@ -369,7 +370,6 @@ i915_gem_set_tiling(struct drm_device *d
}
}
- mutex_lock(&dev->struct_mutex);
if (args->tiling_mode != obj->tiling_mode ||
args->stride != obj->stride) {
/* We need to rebind the object if its current allocation
@@ -424,6 +424,7 @@ i915_gem_set_tiling(struct drm_device *d
obj->bit_17 = NULL;
}
+err:
drm_gem_object_unreference(&obj->base);
mutex_unlock(&dev->struct_mutex);
Patches currently in stable-queue which might be from [email protected]
are
queue-3.19/drm-i915-check-obj-vma_list-under-the-struct_mutex.patch
queue-3.19/drm-i915-check-for-driver-readyness-before-handling-an-underrun-interrupt.patch
queue-3.19/acpi-video-load-the-module-even-if-acpi-is-disabled.patch
queue-3.19/drm-i915-prevent-use-after-free-in-invalidate_range_start-callback.patch
queue-3.19/drm-i915-insert-a-command-barrier-on-blt-bsd-cache-flushes.patch
queue-3.19/drm-i915-clamp-efficient-frequency-to-valid-range.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html