summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-07-26 22:47:15 +0200
committerEric Anholt <eric@anholt.net>2016-08-20 04:17:39 +0200
commit552416c146fadc67cd9b53ef7adf88d3381c43a6 (patch)
tree99e37ece2f7ef9c144a03d28dfae103c16695680 /drivers/gpu
parentdrm/vc4: Fix overflow mem unreferencing when the binner runs dry. (diff)
downloadlinux-552416c146fadc67cd9b53ef7adf88d3381c43a6.tar.xz
linux-552416c146fadc67cd9b53ef7adf88d3381c43a6.zip
drm/vc4: Fix oops when userspace hands in a bad BO.
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
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index fba2c831afe6..b262c5c26f10 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -573,7 +573,7 @@ vc4_cl_lookup_bos(struct drm_device *dev,
fail:
drm_free_large(handles);
- return 0;
+ return ret;
}
static int