Skip to content

Commit

Permalink
drm/ttm: Fix TTM object open regression
Browse files Browse the repository at this point in the history
Commit drm/ttm: ttm object security fixes for render nodes introduced a
regression where, if a TTM object was opened multiple times from the same
open file, the caller would spin uninterruptibly in the kernel.

Fix this.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
  • Loading branch information
Thomas Hellstrom committed Feb 5, 2014
1 parent 76f4f41 commit c66f854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ttm/ttm_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int ttm_ref_object_add(struct ttm_object_file *tfile,

if (ret == 0) {
ref = drm_hash_entry(hash, struct ttm_ref_object, hash);
if (!kref_get_unless_zero(&ref->kref)) {
if (kref_get_unless_zero(&ref->kref)) {
rcu_read_unlock();
break;
}
Expand Down

0 comments on commit c66f854

Please sign in to comment.