diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-08 18:59:02 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-08 18:59:02 +0100 |
commit | bf8f46d4c64eb5b66814223f7e5ddb8d8e7a555e (patch) | |
tree | 24ede8ce1f30bb21ea0cc1ad6f30a48c753ac4be | |
parent | e4b2da440699f581a8779ea8cb9e99e4c903e6a7 (diff) |
Fix mm_block leak.
Some other minor fixes.
-rw-r--r-- | linux-core/drmP.h | 4 | ||||
-rw-r--r-- | linux-core/drm_bo_move.c | 5 | ||||
-rw-r--r-- | linux-core/drm_vm.c | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 7b8f2c66..55035210 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -608,9 +608,6 @@ typedef enum { } drm_object_type_t; - - - /* * A user object is a structure that helps the drm give out user handles * to kernel internal objects and to keep track of these objects so that @@ -647,6 +644,7 @@ typedef struct drm_ref_object { drm_ref_t unref_action; } drm_ref_object_t; +struct drm_buffer_object; #include "drm_ttm.h" diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c index b7a49299..4ed3392d 100644 --- a/linux-core/drm_bo_move.c +++ b/linux-core/drm_bo_move.c @@ -243,6 +243,11 @@ int drm_bo_move_memcpy(drm_buffer_object_t *bo, } mb(); out2: + if (old_mem->mm_node) { + mutex_lock(&dev->struct_mutex); + drm_mm_put_block(old_mem->mm_node); + mutex_unlock(&dev->struct_mutex); + } *old_mem = *new_mem; new_mem->mm_node = NULL; old_mem->mask = save_mask; diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 25779eca..5afa9800 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -732,7 +732,6 @@ struct page *drm_bo_vm_fault(struct vm_area_struct *vma, { unsigned long address = data->address; drm_buffer_object_t *bo = (drm_buffer_object_t *) vma->vm_private_data; - drm_local_map_t *map; unsigned long page_offset; struct page *page = NULL; drm_ttm_t *ttm; |