[PATCH 4/5] drm/ttm: Fix locking in an error path
Thomas Hellstrom
thellstrom at vmware.com
Tue Nov 20 04:16:50 PST 2012
Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
---
drivers/gpu/drm/ttm/ttm_object.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c
index f18eeb4..0e13d9f 100644
--- a/drivers/gpu/drm/ttm/ttm_object.c
+++ b/drivers/gpu/drm/ttm/ttm_object.c
@@ -174,7 +174,9 @@ int ttm_base_object_init(struct ttm_object_file *tfile,
return 0;
out_err1:
+ spin_lock(&tdev->object_lock);
(void)drm_ht_remove_item(&tdev->object_hash, &base->hash);
+ spin_unlock(&tdev->object_lock);
out_err0:
return ret;
}
--
1.7.4.4
More information about the dri-devel
mailing list