From: Greg Kroah-Hartman Date: Mon, 6 Dec 2010 20:08:19 +0000 (-0800) Subject: .33 patch X-Git-Tag: v2.6.27.57~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91bc11f0ec4cd1050ecddfa18ee183d12aae2e7b;p=thirdparty%2Fkernel%2Fstable-queue.git .33 patch --- diff --git a/queue-2.6.33/drm-ttm-clear-the-ghost-cpu_writers-flag-on-ttm_buffer_object_transfer.patch b/queue-2.6.33/drm-ttm-clear-the-ghost-cpu_writers-flag-on-ttm_buffer_object_transfer.patch new file mode 100644 index 00000000000..5413a63d246 --- /dev/null +++ b/queue-2.6.33/drm-ttm-clear-the-ghost-cpu_writers-flag-on-ttm_buffer_object_transfer.patch @@ -0,0 +1,40 @@ +From 0fbecd400dd0a82d465b3086f209681e8c54cb0f Mon Sep 17 00:00:00 2001 +From: Francisco Jerez +Date: Tue, 21 Sep 2010 02:15:15 +0200 +Subject: drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer. + +From: Francisco Jerez + +commit 0fbecd400dd0a82d465b3086f209681e8c54cb0f upstream. + +It makes sense for a BO to move after a process has requested +exclusive RW access on it (e.g. because the BO used to be located in +unmappable VRAM and we intercepted the CPU access from the fault +handler). + +If we let the ghost object inherit cpu_writers from the original +object, ttm_bo_release_list() will raise a kernel BUG when the ghost +object is destroyed. This can be reproduced with the nouveau driver on +nv5x. + +Reported-by: Marcin Slusarz +Reviewed-by: Jerome Glisse +Tested-by: Marcin Slusarz +Signed-off-by: Francisco Jerez +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/ttm/ttm_bo_util.c ++++ b/drivers/gpu/drm/ttm/ttm_bo_util.c +@@ -326,6 +326,7 @@ static int ttm_buffer_object_transfer(st + INIT_LIST_HEAD(&fbo->lru); + INIT_LIST_HEAD(&fbo->swap); + fbo->vm_node = NULL; ++ atomic_set(&fbo->cpu_writers, 0); + + fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); + if (fbo->mem.mm_node) diff --git a/queue-2.6.33/series b/queue-2.6.33/series index f33282de0a3..2257987a711 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -143,3 +143,4 @@ netfilter-nf_conntrack-allow-nf_ct_alloc_hashtable-to-get-highmem-pages.patch latencytop-fix-per-task-accumulator.patch mm-vfs-revalidate-page-mapping-in-do_generic_file_read.patch bio-take-care-not-overflow-page-count-when-mapping-copying-user-data.patch +drm-ttm-clear-the-ghost-cpu_writers-flag-on-ttm_buffer_object_transfer.patch