* [PATCH] drm/v3d: don't leak bin job if v3d_job_init fails.
@ 2019-09-16 7:11 Iago Toral Quiroga
2019-09-18 17:41 ` Eric Anholt
0 siblings, 1 reply; 2+ messages in thread
From: Iago Toral Quiroga @ 2019-09-16 7:11 UTC (permalink / raw)
To: dri-devel; +Cc: Iago Toral Quiroga
If the initialization of the job fails we need to kfree() it
before returning.
Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
---
drivers/gpu/drm/v3d/v3d_gem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index d46d91346d09..ed68731404a7 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -566,6 +566,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);
return ret;
}
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/v3d: don't leak bin job if v3d_job_init fails.
2019-09-16 7:11 [PATCH] drm/v3d: don't leak bin job if v3d_job_init fails Iago Toral Quiroga
@ 2019-09-18 17:41 ` Eric Anholt
0 siblings, 0 replies; 2+ messages in thread
From: Eric Anholt @ 2019-09-18 17:41 UTC (permalink / raw)
To: dri-devel; +Cc: Iago Toral Quiroga
[-- Attachment #1.1: Type: text/plain, Size: 281 bytes --]
Iago Toral Quiroga <itoral@igalia.com> writes:
> If the initialization of the job fails we need to kfree() it
> before returning.
>
> Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Applied to drm-misc-next with a fixes tag for the commit that introduced
the bug. Thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-18 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 7:11 [PATCH] drm/v3d: don't leak bin job if v3d_job_init fails Iago Toral Quiroga
2019-09-18 17:41 ` Eric Anholt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.