From patchwork Thu Jul 16 14:42:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11669379 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E70AE618 for ; Fri, 17 Jul 2020 07:23:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE8B420737 for ; Fri, 17 Jul 2020 07:23:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE8B420737 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17E836ED35; Fri, 17 Jul 2020 07:22:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3950A6EBB1 for ; Thu, 16 Jul 2020 14:42:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B94BEB76A; Thu, 16 Jul 2020 14:42:51 +0000 (UTC) From: Nicolas Saenz Julienne To: Eric Anholt , Dave Airlie Subject: [PATCH] drm/v3d: Fix double free in gem code Date: Thu, 16 Jul 2020 16:42:29 +0200 Message-Id: <20200716144229.2581-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 17 Jul 2020 07:22:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" These two patches fix the same issue: - drm/v3d: Fix memory leak in v3d_submit_cl_ioctl (29cd13cfd76) - drm/v3d: don't leak bin job if v3d_job_init fails (0d352a3a8a1) And it seems that the conflict was missed during the merge. Get rid of one of the free() calls. Fixes: 77e0723bd27f ("Merge v5.4-rc7 into drm-next") Signed-off-by: Nicolas Saenz Julienne --- 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 915f8bfdb58c..3cfbdb8e6a91 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -570,7 +570,6 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, if (ret) { kfree(bin); v3d_job_put(&render->base); - kfree(bin); return ret; }