* [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
@ 2019-10-24 20:53 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2019-10-24 20:53 UTC (permalink / raw)
To: Eric Anholt, Stephen Rothwell; +Cc: David Airlie, kernel-janitors, dri-devel
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>
---
Hi Stephen,
I think this one is actually just a linux-next issue and the Fixes tag
would point to commit f8593384f83f ("Merge remote-tracking branch
'drm/drm-next'").
The original commits are 0d352a3a8a1f ("drm/v3d: don't leak bin job if
v3d_job_init fails.") and commit 29cd13cfd762 ("drm/v3d: Fix memory leak
in v3d_submit_cl_ioctl").
I'm not totally sure how you guys address this normally but presumably
you are experts at dealing with merge issues. :)
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 549dde83408b..37515e47b47e 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.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
@ 2019-10-24 20:53 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2019-10-24 20:53 UTC (permalink / raw)
To: Eric Anholt, Stephen Rothwell; +Cc: David Airlie, kernel-janitors, dri-devel
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>
---
Hi Stephen,
I think this one is actually just a linux-next issue and the Fixes tag
would point to commit f8593384f83f ("Merge remote-tracking branch
'drm/drm-next'").
The original commits are 0d352a3a8a1f ("drm/v3d: don't leak bin job if
v3d_job_init fails.") and commit 29cd13cfd762 ("drm/v3d: Fix memory leak
in v3d_submit_cl_ioctl").
I'm not totally sure how you guys address this normally but presumably
you are experts at dealing with merge issues. :)
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 549dde83408b..37515e47b47e 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.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
2019-10-24 20:53 ` Dan Carpenter
@ 2019-10-24 22:09 ` Stephen Rothwell
-1 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2019-10-24 22:09 UTC (permalink / raw)
To: Dan Carpenter; +Cc: David Airlie, kernel-janitors, dri-devel
[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]
Hi Dan,
On Thu, 24 Oct 2019 23:53:06 +0300 Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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>
> ---
> Hi Stephen,
>
> I think this one is actually just a linux-next issue and the Fixes tag
> would point to commit f8593384f83f ("Merge remote-tracking branch
> 'drm/drm-next'").
>
> The original commits are 0d352a3a8a1f ("drm/v3d: don't leak bin job if
> v3d_job_init fails.") and commit 29cd13cfd762 ("drm/v3d: Fix memory leak
> in v3d_submit_cl_ioctl").
>
> I'm not totally sure how you guys address this normally but presumably
> you are experts at dealing with merge issues. :)
>
> 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 549dde83408b..37515e47b47e 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;
I will just apply this as part of the drm tree merge until Dave merges
the drm-misc-fixes tree and fixes this up.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
@ 2019-10-24 22:09 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2019-10-24 22:09 UTC (permalink / raw)
To: Dan Carpenter; +Cc: David Airlie, kernel-janitors, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1533 bytes --]
Hi Dan,
On Thu, 24 Oct 2019 23:53:06 +0300 Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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>
> ---
> Hi Stephen,
>
> I think this one is actually just a linux-next issue and the Fixes tag
> would point to commit f8593384f83f ("Merge remote-tracking branch
> 'drm/drm-next'").
>
> The original commits are 0d352a3a8a1f ("drm/v3d: don't leak bin job if
> v3d_job_init fails.") and commit 29cd13cfd762 ("drm/v3d: Fix memory leak
> in v3d_submit_cl_ioctl").
>
> I'm not totally sure how you guys address this normally but presumably
> you are experts at dealing with merge issues. :)
>
> 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 549dde83408b..37515e47b47e 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;
I will just apply this as part of the drm tree merge until Dave merges
the drm-misc-fixes tree and fixes this up.
--
Cheers,
Stephen Rothwell
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 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] 10+ messages in thread
* Re: [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
2019-10-24 22:09 ` Stephen Rothwell
@ 2020-10-26 9:46 ` Dan Carpenter
-1 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2020-10-26 9:46 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Eric Anholt, David Airlie, kernel-janitors, dri-devel
On Fri, Oct 25, 2019 at 09:09:56AM +1100, Stephen Rothwell wrote:
> Hi Dan,
>
> On Thu, 24 Oct 2019 23:53:06 +0300 Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > 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>
> > ---
> > Hi Stephen,
> >
> > I think this one is actually just a linux-next issue and the Fixes tag
> > would point to commit f8593384f83f ("Merge remote-tracking branch
> > 'drm/drm-next'").
> >
> > The original commits are 0d352a3a8a1f ("drm/v3d: don't leak bin job if
> > v3d_job_init fails.") and commit 29cd13cfd762 ("drm/v3d: Fix memory leak
> > in v3d_submit_cl_ioctl").
> >
> > I'm not totally sure how you guys address this normally but presumably
> > you are experts at dealing with merge issues. :)
> >
> > 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 549dde83408b..37515e47b47e 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;
>
> I will just apply this as part of the drm tree merge until Dave merges
> the drm-misc-fixes tree and fixes this up.
>
It turns out that Dave never fixed it. Let me resend.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
@ 2020-10-26 9:46 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2020-10-26 9:46 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Eric Anholt, David Airlie, kernel-janitors, dri-devel
On Fri, Oct 25, 2019 at 09:09:56AM +1100, Stephen Rothwell wrote:
> Hi Dan,
>
> On Thu, 24 Oct 2019 23:53:06 +0300 Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > 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>
> > ---
> > Hi Stephen,
> >
> > I think this one is actually just a linux-next issue and the Fixes tag
> > would point to commit f8593384f83f ("Merge remote-tracking branch
> > 'drm/drm-next'").
> >
> > The original commits are 0d352a3a8a1f ("drm/v3d: don't leak bin job if
> > v3d_job_init fails.") and commit 29cd13cfd762 ("drm/v3d: Fix memory leak
> > in v3d_submit_cl_ioctl").
> >
> > I'm not totally sure how you guys address this normally but presumably
> > you are experts at dealing with merge issues. :)
> >
> > 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 549dde83408b..37515e47b47e 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;
>
> I will just apply this as part of the drm tree merge until Dave merges
> the drm-misc-fixes tree and fixes this up.
>
It turns out that Dave never fixed it. Let me resend.
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH resend] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
2019-10-24 20:53 ` Dan Carpenter
@ 2020-10-26 9:49 ` Dan Carpenter
-1 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2020-10-26 9:49 UTC (permalink / raw)
To: Eric Anholt, Stephen Rothwell; +Cc: David Airlie, kernel-janitors, dri-devel
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>
---
Resending a year later because it was confusing at the time who should
apply this and it fell through the cracks. For some reason the kbuild
bot flagged it as a new warning so it showed up on my radar again.
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 549dde83408b..37515e47b47e 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.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH resend] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
@ 2020-10-26 9:49 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2020-10-26 9:49 UTC (permalink / raw)
To: Eric Anholt, Stephen Rothwell
Cc: David Airlie, Eric Anholt, kernel-janitors, dri-devel
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>
---
Resending a year later because it was confusing at the time who should
apply this and it fell through the cracks. For some reason the kbuild
bot flagged it as a new warning so it showed up on my radar again.
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 549dde83408b..37515e47b47e 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.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH resend] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
2020-10-26 9:49 ` Dan Carpenter
@ 2020-10-26 10:23 ` Maxime Ripard
-1 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2020-10-26 10:23 UTC (permalink / raw)
To: Dan Carpenter
Cc: Eric Anholt, Stephen Rothwell, David Airlie, kernel-janitors, dri-devel
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
On Mon, Oct 26, 2020 at 12:49:05PM +0300, Dan Carpenter wrote:
> 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>
> ---
> Resending a year later because it was confusing at the time who should
> apply this and it fell through the cracks. For some reason the kbuild
> bot flagged it as a new warning so it showed up on my radar again.
Applied, thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH resend] drm/v3d: Fix double free in v3d_submit_cl_ioctl()
@ 2020-10-26 10:23 ` Maxime Ripard
0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2020-10-26 10:23 UTC (permalink / raw)
To: Dan Carpenter
Cc: Eric Anholt, Stephen Rothwell, David Airlie, kernel-janitors, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]
On Mon, Oct 26, 2020 at 12:49:05PM +0300, Dan Carpenter wrote:
> 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>
> ---
> Resending a year later because it was confusing at the time who should
> apply this and it fell through the cracks. For some reason the kbuild
> bot flagged it as a new warning so it showed up on my radar again.
Applied, thanks!
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-26 18:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 20:53 [PATCH] drm/v3d: Fix double free in v3d_submit_cl_ioctl() Dan Carpenter
2019-10-24 20:53 ` Dan Carpenter
2019-10-24 22:09 ` Stephen Rothwell
2019-10-24 22:09 ` Stephen Rothwell
2020-10-26 9:46 ` Dan Carpenter
2020-10-26 9:46 ` Dan Carpenter
2020-10-26 9:49 ` [PATCH resend] " Dan Carpenter
2020-10-26 9:49 ` Dan Carpenter
2020-10-26 10:23 ` Maxime Ripard
2020-10-26 10:23 ` Maxime Ripard
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.