Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3199505pxb; Mon, 9 Nov 2020 05:25:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/xdQN7vf//RhrT5rwYRaD9zBBSPXWIKKO2wJp0+0LVDj4Fw1Uw8f4kUaffLkLfe6TbHub X-Received: by 2002:aa7:da01:: with SMTP id r1mr7818044eds.45.1604928347788; Mon, 09 Nov 2020 05:25:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604928347; cv=none; d=google.com; s=arc-20160816; b=02ySs2xSJN0texndxPWGc208GwsWAoZ0kharKA91fVI4Ac3YLxXHhALKhgapxe4BgL hRA4QzfkhhfrNEPvtcADFHDpqWph2d85X70pHh4H4Q3Ko45cldk3oTY+N0JhXjg0LQFI DFFrXu7gSbzr79E4rP/JE1q2LAj38q01H9szA8LPwdaZBy6P4buNrxq8GSop644RrMcn nsK0PtSbC3gToAiWpMKviCOii8sYGN53mhpUv9RLwxzdea+0M6y0TF+mx/oQh0CoD1Ic Qe008i1l7cO1Yfj2k5i8PQBgnCbTKZp8G9NCkZt24GNqxP3vEkd1kAVK/C2SSe07MKPk oc2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Hby+CFSczlJYZPYSDSmi3jsmTfVPHgU8Cdlp/UuJ6Co=; b=MJVFCuNcqo2LmM8O9tbH/T3WES/M7TixcVG1kqD86ivT8EvMMTcSr/zw24O/+r0x39 VuVqupaoiNuNqtkJ4Bir7fonyYyGx129VmImpT2XsLImZr06EgJjLmE5UDi/FNOcdEch r1s10swNROpxZ6S0Il1VTDpg1115wAhBys2abHRnzfpL2e1zYMhD5RLIiR1bzF/LzJZN KGDcIvSq1wzZ7r8LcbgbA4DnJWRhzFNJacYUkfqCMWYX9j0qC2xSOjbFYFvGODWFxMZ9 T/iL6s7VuKPc0Uv+EV9b2ThsqiF4boQRDX99HclAi6PqfRMi23JYu/zQ7+dMIKfnfBmv Z3Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HbfEvkaz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pk19si6927697ejb.413.2020.11.09.05.25.23; Mon, 09 Nov 2020 05:25:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HbfEvkaz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387406AbgKINYD (ORCPT + 99 others); Mon, 9 Nov 2020 08:24:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:46986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732846AbgKINTe (ORCPT ); Mon, 9 Nov 2020 08:19:34 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F129B2083B; Mon, 9 Nov 2020 13:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927973; bh=Y6uXY5C00WL5m4QLuoLJfu/7E8rvKuQY0cP45TjdG80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HbfEvkazZ0ITKWZYbo8FzPft6de1kTZ/RSwt1ooaQhTmzQ2TxhohvHsexuL0EWhG/ SADMAdzHXFq4FAGb7aeElhRZgab6/Lf3/JwIFHKd0OLSh010m3y4R9ij7OqJUfA3J6 tRF6M5rqvthq60Eg0yYiMkjiqChfAo0AmhBj1R90= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Maxime Ripard , Sasha Levin Subject: [PATCH 5.9 084/133] drm/v3d: Fix double free in v3d_submit_cl_ioctl() Date: Mon, 9 Nov 2020 13:55:46 +0100 Message-Id: <20201109125034.760072033@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125030.706496283@linuxfoundation.org> References: <20201109125030.706496283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 897dbea6b716c0f2c5bcd4ba1eb4d809caba290c ] Originally this error path used to leak "bin" but then we accidentally applied two separate commits to fix it and ended up with a double free. Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201026094905.GA1634423@mwanda Signed-off-by: Sasha Levin --- drivers/gpu/drm/v3d/v3d_gem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 915f8bfdb58ca..182c586525eb8 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -568,7 +568,6 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, ret = v3d_job_init(v3d, file_priv, &bin->base, v3d_job_free, args->in_sync_bcl); if (ret) { - kfree(bin); v3d_job_put(&render->base); kfree(bin); return ret; -- 2.27.0