projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
539d241
)
drm/radeon/kms: take vram mutex pointer before derefing object.
author
Dave Airlie
<airlied@redhat.com>
Thu, 29 Apr 2010 08:37:59 +0000
(18:37 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Tue, 18 May 2010 08:21:37 +0000
(18:21 +1000)
since derefing the object might free it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_object.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/radeon/radeon_object.c
b/drivers/gpu/drm/radeon/radeon_object.c
index 06def708b014100c6d935ce82b1a4ea92e94f2d0..a8d18bcae7db08ba2c62cd2cedb45acc3afdeac5 100644
(file)
--- a/
drivers/gpu/drm/radeon/radeon_object.c
+++ b/
drivers/gpu/drm/radeon/radeon_object.c
@@
-168,13
+168,15
@@
void radeon_bo_kunmap(struct radeon_bo *bo)
void radeon_bo_unref(struct radeon_bo **bo)
{
struct ttm_buffer_object *tbo;
+ struct radeon_device *rdev;
if ((*bo) == NULL)
return;
+ rdev = (*bo)->rdev;
tbo = &((*bo)->tbo);
- mutex_lock(&
(*bo)->
rdev->vram_mutex);
+ mutex_lock(&rdev->vram_mutex);
ttm_bo_unref(&tbo);
- mutex_unlock(&
(*bo)->
rdev->vram_mutex);
+ mutex_unlock(&rdev->vram_mutex);
if (tbo == NULL)
*bo = NULL;
}