Browse Source

drm/nouveau: fix failure path if userspace specifies no valid memtypes

We need to add the buffer to the list even if we fail, otherwise the
validate_fini() call won't unreserve + unreference the GEM object,
making TTM very unhappy.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 15 năm trước cách đây
mục cha
commit
0208843dd5
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      drivers/gpu/drm/nouveau/nouveau_gem.c

+ 1 - 0
drivers/gpu/drm/nouveau/nouveau_gem.c

@@ -321,6 +321,7 @@ retry:
 		else {
 			NV_ERROR(dev, "invalid valid domains: 0x%08x\n",
 				 b->valid_domains);
+			list_add_tail(&nvbo->entry, &op->both_list);
 			validate_fini(op, NULL);
 			return -EINVAL;
 		}