]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/vc4: Fix oops when userspace hands in a bad BO.
authorEric Anholt <eric@anholt.net>
Tue, 26 Jul 2016 20:47:15 +0000 (13:47 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 20 Aug 2016 02:17:39 +0000 (19:17 -0700)
We'd end up NULL pointer dereferencing because we didn't take the
error path out in the parent.  Fixes igt vc4_lookup_fail test.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
Cc: stable@vger.kernel.org
drivers/gpu/drm/vc4/vc4_gem.c

index fba2c831afe66c1507e3b9038216c7dc90a69cb2..b262c5c26f109702572ed613fa0965f06a993ef9 100644 (file)
@@ -573,7 +573,7 @@ vc4_cl_lookup_bos(struct drm_device *dev,
 
 fail:
        drm_free_large(handles);
-       return 0;
+       return ret;
 }
 
 static int