lkml.org 
[lkml]   [2017]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4.13 092/110] etnaviv: fix submit error path
Date
4.13-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Lucas Stach <l.stach@pengutronix.de>

commit 5a642e6bc49f59922e19ebd639e74f72753fc77b upstream.

If the gpu submit fails, bail out to avoid accessing a potentially
unititalized fence.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -445,8 +445,10 @@ int etnaviv_ioctl_gem_submit(struct drm_
cmdbuf->user_size = ALIGN(args->stream_size, 8);

ret = etnaviv_gpu_submit(gpu, submit, cmdbuf);
- if (ret == 0)
- cmdbuf = NULL;
+ if (ret)
+ goto out;
+
+ cmdbuf = NULL;

if (args->flags & ETNA_SUBMIT_FENCE_FD_OUT) {
/*

\
 
 \ /
  Last update: 2017-10-03 14:40    [W:0.424 / U:2.036 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site