As Eric pointed out, this patch should not be applied. There were 2 patches addressing the very same leak and it seems one of them already landed and this one is being applied on top of it, so in practice, this patch is producing a double free.
Iago
On Sun, 2020-09-27 at 13:52 -0400, Sasha Levin wrote:
This is a note to let you know that I've just added the patch titled
drm/v3d: don't leak bin job if v3d_job_init fails.
to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: drm-v3d-don-t-leak-bin-job-if-v3d_job_init-fails.patch and it can be found in the queue-5.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
commit cd0324f318e4447471e0bb01d4bea4f5de4aab1e Author: Iago Toral Quiroga itoral@igalia.com Date: Mon Sep 16 09:11:25 2019 +0200
drm/v3d: don't leak bin job if v3d_job_init fails.
[ Upstream commit 0d352a3a8a1f26168d09f7073e61bb4b328e3bb9 ] If the initialization of the job fails we need to kfree() it before returning. Signed-off-by: Iago Toral Quiroga itoral@igalia.com Signed-off-by: Eric Anholt eric@anholt.net Link: https://patchwork.freedesktop.org/patch/msgid/20190916071125.5255-1-itoral@i... Fixes: a783a09ee76d ("drm/v3d: Refactor job management.") Reviewed-by: Eric Anholt eric@anholt.net Signed-off-by: Sasha Levin sashal@kernel.org
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 19c092d75266b..6316bf3646af5 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -565,6 +565,7 @@ 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;
On Mon, Sep 28, 2020 at 07:51:17AM +0200, Iago Toral wrote:
As Eric pointed out, this patch should not be applied. There were 2 patches addressing the very same leak and it seems one of them already landed and this one is being applied on top of it, so in practice, this patch is producing a double free.
Now dropped, thanks.
greg k-h
linux-stable-mirror@lists.linaro.org