From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:57040 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbdJBMaS (ORCPT ); Mon, 2 Oct 2017 08:30:18 -0400 Subject: Patch "etnaviv: fix submit error path" has been added to the 4.13-stable tree To: l.stach@pengutronix.de, gregkh@linuxfoundation.org Cc: , From: Date: Mon, 02 Oct 2017 14:30:06 +0200 Message-ID: <15069474065121@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled etnaviv: fix submit error path to the 4.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: etnaviv-fix-submit-error-path.patch and it can be found in the queue-4.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 5a642e6bc49f59922e19ebd639e74f72753fc77b Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 8 Sep 2017 16:24:32 +0200 Subject: etnaviv: fix submit error path From: Lucas Stach commit 5a642e6bc49f59922e19ebd639e74f72753fc77b upstream. If the gpu submit fails, bail out to avoid accessing a potentially unititalized fence. Signed-off-by: Lucas Stach Signed-off-by: Greg Kroah-Hartman --- 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) { /* Patches currently in stable-queue which might be from l.stach@pengutronix.de are queue-4.13/etnaviv-fix-gem-object-list-corruption.patch queue-4.13/etnaviv-fix-submit-error-path.patch