Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c66f8543 authored by Thomas Hellstrom's avatar Thomas Hellstrom
Browse files

drm/ttm: Fix TTM object open regression



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: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
parent 76f4f415
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
			}