From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
dri-devel@lists.freedesktop.org,
Maxime Ripard <maxime@cerno.tech>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: [PATCH AUTOSEL 5.8 14/29] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
Date: Mon, 2 Nov 2020 20:19:13 -0500 [thread overview]
Message-ID: <20201103011928.183145-14-sashal@kernel.org> (raw)
In-Reply-To: <20201103011928.183145-1-sashal@kernel.org>
From: Dan Carpenter <dan.carpenter@oracle.com>
[ 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 <dan.carpenter@oracle.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201026094905.GA1634423@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 09a7639cf161f..0e0f1cc3e283a 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-11-03 1:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201103011928.183145-1-sashal@kernel.org>
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 07/29] hyperv_fb: Update screen_info after removing old framebuffer Sasha Levin
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 11/29] drm/sun4i: frontend: Rework a bit the phase data Sasha Levin
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 12/29] drm/sun4i: frontend: Reuse the ch0 phase for RGB formats Sasha Levin
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 13/29] drm/sun4i: frontend: Fix the scaler phase on A33 Sasha Levin
2020-11-03 1:19 ` Sasha Levin [this message]
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 19/29] drm/amdgpu: add DID for navi10 blockchain SKU Sasha Levin
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 24/29] drm/vc4: drv: Add error handding for bind Sasha Levin
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 27/29] drm/nouveau/nouveau: fix the start/end range for migration Sasha Levin
2020-11-03 1:19 ` [PATCH AUTOSEL 5.8 28/29] drm/nouveau/gem: fix "refcount_t: underflow; use-after-free" Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201103011928.183145-14-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).