Commit 0208843d authored by Ben Skeggs's avatar Ben Skeggs

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent a1470890
...@@ -321,6 +321,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -321,6 +321,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
else { else {
NV_ERROR(dev, "invalid valid domains: 0x%08x\n", NV_ERROR(dev, "invalid valid domains: 0x%08x\n",
b->valid_domains); b->valid_domains);
list_add_tail(&nvbo->entry, &op->both_list);
validate_fini(op, NULL); validate_fini(op, NULL);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment