All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
@ 2021-06-24 17:47 ` Jason Ekstrand
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Ekstrand @ 2021-06-24 17:47 UTC (permalink / raw)
  To: dri-devel, intel-gfx
  Cc: Gustavo Padovan, Christian König, Jason Ekstrand

Each add_fence() call does a dma_fence_get() on the relevant fence.  In
the error path, we weren't calling dma_fence_put() so all those fences
got leaked.  Also, in the krealloc_array failure case, we weren't
freeing the fences array.  Instead, ensure that i and fences are always
zero-initialized and dma_fence_put() all the fences and kfree(fences) on
every error path.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Christian König <christian.koenig@amd.com>
---
 drivers/dma-buf/sync_file.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index 20d9bddbb985b..394e6e1e96860 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 					 struct sync_file *b)
 {
 	struct sync_file *sync_file;
-	struct dma_fence **fences, **nfences, **a_fences, **b_fences;
-	int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
+	struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
+	int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
 
 	sync_file = sync_file_alloc();
 	if (!sync_file)
@@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 	 * If a sync_file can only be created with sync_file_merge
 	 * and sync_file_create, this is a reasonable assumption.
 	 */
-	for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
+	for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
 		struct dma_fence *pt_a = a_fences[i_a];
 		struct dma_fence *pt_b = b_fences[i_b];
 
@@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 		fences = nfences;
 	}
 
-	if (sync_file_set_fence(sync_file, fences, i) < 0) {
-		kfree(fences);
+	if (sync_file_set_fence(sync_file, fences, i) < 0)
 		goto err;
-	}
 
 	strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
 	return sync_file;
 
 err:
+	while (i)
+		dma_fence_put(fences[--i]);
+	kfree(fences);
 	fput(sync_file->file);
 	return NULL;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Intel-gfx] [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
@ 2021-06-24 17:47 ` Jason Ekstrand
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Ekstrand @ 2021-06-24 17:47 UTC (permalink / raw)
  To: dri-devel, intel-gfx; +Cc: Gustavo Padovan, Christian König

Each add_fence() call does a dma_fence_get() on the relevant fence.  In
the error path, we weren't calling dma_fence_put() so all those fences
got leaked.  Also, in the krealloc_array failure case, we weren't
freeing the fences array.  Instead, ensure that i and fences are always
zero-initialized and dma_fence_put() all the fences and kfree(fences) on
every error path.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Christian König <christian.koenig@amd.com>
---
 drivers/dma-buf/sync_file.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index 20d9bddbb985b..394e6e1e96860 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 					 struct sync_file *b)
 {
 	struct sync_file *sync_file;
-	struct dma_fence **fences, **nfences, **a_fences, **b_fences;
-	int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
+	struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
+	int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
 
 	sync_file = sync_file_alloc();
 	if (!sync_file)
@@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 	 * If a sync_file can only be created with sync_file_merge
 	 * and sync_file_create, this is a reasonable assumption.
 	 */
-	for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
+	for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
 		struct dma_fence *pt_a = a_fences[i_a];
 		struct dma_fence *pt_b = b_fences[i_b];
 
@@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 		fences = nfences;
 	}
 
-	if (sync_file_set_fence(sync_file, fences, i) < 0) {
-		kfree(fences);
+	if (sync_file_set_fence(sync_file, fences, i) < 0)
 		goto err;
-	}
 
 	strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
 	return sync_file;
 
 err:
+	while (i)
+		dma_fence_put(fences[--i]);
+	kfree(fences);
 	fput(sync_file->file);
 	return NULL;
 
-- 
2.31.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
  2021-06-24 17:47 ` [Intel-gfx] " Jason Ekstrand
@ 2021-06-24 17:58   ` Christian König
  -1 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2021-06-24 17:58 UTC (permalink / raw)
  To: Jason Ekstrand, dri-devel, intel-gfx; +Cc: Gustavo Padovan

Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
> Each add_fence() call does a dma_fence_get() on the relevant fence.  In
> the error path, we weren't calling dma_fence_put() so all those fences
> got leaked.  Also, in the krealloc_array failure case, we weren't
> freeing the fences array.  Instead, ensure that i and fences are always
> zero-initialized and dma_fence_put() all the fences and kfree(fences) on
> every error path.
>
> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Cc: Christian König <christian.koenig@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/dma-buf/sync_file.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> index 20d9bddbb985b..394e6e1e96860 100644
> --- a/drivers/dma-buf/sync_file.c
> +++ b/drivers/dma-buf/sync_file.c
> @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>   					 struct sync_file *b)
>   {
>   	struct sync_file *sync_file;
> -	struct dma_fence **fences, **nfences, **a_fences, **b_fences;
> -	int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> +	struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
> +	int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
>   
>   	sync_file = sync_file_alloc();
>   	if (!sync_file)
> @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>   	 * If a sync_file can only be created with sync_file_merge
>   	 * and sync_file_create, this is a reasonable assumption.
>   	 */
> -	for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> +	for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
>   		struct dma_fence *pt_a = a_fences[i_a];
>   		struct dma_fence *pt_b = b_fences[i_b];
>   
> @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>   		fences = nfences;
>   	}
>   
> -	if (sync_file_set_fence(sync_file, fences, i) < 0) {
> -		kfree(fences);
> +	if (sync_file_set_fence(sync_file, fences, i) < 0)
>   		goto err;
> -	}
>   
>   	strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
>   	return sync_file;
>   
>   err:
> +	while (i)
> +		dma_fence_put(fences[--i]);
> +	kfree(fences);
>   	fput(sync_file->file);
>   	return NULL;
>   


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
@ 2021-06-24 17:58   ` Christian König
  0 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2021-06-24 17:58 UTC (permalink / raw)
  To: Jason Ekstrand, dri-devel, intel-gfx; +Cc: Gustavo Padovan

Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
> Each add_fence() call does a dma_fence_get() on the relevant fence.  In
> the error path, we weren't calling dma_fence_put() so all those fences
> got leaked.  Also, in the krealloc_array failure case, we weren't
> freeing the fences array.  Instead, ensure that i and fences are always
> zero-initialized and dma_fence_put() all the fences and kfree(fences) on
> every error path.
>
> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Cc: Christian König <christian.koenig@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/dma-buf/sync_file.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> index 20d9bddbb985b..394e6e1e96860 100644
> --- a/drivers/dma-buf/sync_file.c
> +++ b/drivers/dma-buf/sync_file.c
> @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>   					 struct sync_file *b)
>   {
>   	struct sync_file *sync_file;
> -	struct dma_fence **fences, **nfences, **a_fences, **b_fences;
> -	int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> +	struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
> +	int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
>   
>   	sync_file = sync_file_alloc();
>   	if (!sync_file)
> @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>   	 * If a sync_file can only be created with sync_file_merge
>   	 * and sync_file_create, this is a reasonable assumption.
>   	 */
> -	for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> +	for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
>   		struct dma_fence *pt_a = a_fences[i_a];
>   		struct dma_fence *pt_b = b_fences[i_b];
>   
> @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>   		fences = nfences;
>   	}
>   
> -	if (sync_file_set_fence(sync_file, fences, i) < 0) {
> -		kfree(fences);
> +	if (sync_file_set_fence(sync_file, fences, i) < 0)
>   		goto err;
> -	}
>   
>   	strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
>   	return sync_file;
>   
>   err:
> +	while (i)
> +		dma_fence_put(fences[--i]);
> +	kfree(fences);
>   	fput(sync_file->file);
>   	return NULL;
>   

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
  2021-06-24 17:58   ` [Intel-gfx] " Christian König
@ 2021-06-24 19:43     ` Jason Ekstrand
  -1 siblings, 0 replies; 12+ messages in thread
From: Jason Ekstrand @ 2021-06-24 19:43 UTC (permalink / raw)
  To: Christian König
  Cc: Intel GFX, Gustavo Padovan, Maling list - DRI developers

I don't have drm-misc access.  Mind pushing?

On Thu, Jun 24, 2021 at 12:59 PM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
> > Each add_fence() call does a dma_fence_get() on the relevant fence.  In
> > the error path, we weren't calling dma_fence_put() so all those fences
> > got leaked.  Also, in the krealloc_array failure case, we weren't
> > freeing the fences array.  Instead, ensure that i and fences are always
> > zero-initialized and dma_fence_put() all the fences and kfree(fences) on
> > every error path.
> >
> > Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> > Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
> > Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > Cc: Christian König <christian.koenig@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> >   drivers/dma-buf/sync_file.c | 13 +++++++------
> >   1 file changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> > index 20d9bddbb985b..394e6e1e96860 100644
> > --- a/drivers/dma-buf/sync_file.c
> > +++ b/drivers/dma-buf/sync_file.c
> > @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >                                        struct sync_file *b)
> >   {
> >       struct sync_file *sync_file;
> > -     struct dma_fence **fences, **nfences, **a_fences, **b_fences;
> > -     int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> > +     struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
> > +     int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> >
> >       sync_file = sync_file_alloc();
> >       if (!sync_file)
> > @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >        * If a sync_file can only be created with sync_file_merge
> >        * and sync_file_create, this is a reasonable assumption.
> >        */
> > -     for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> > +     for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> >               struct dma_fence *pt_a = a_fences[i_a];
> >               struct dma_fence *pt_b = b_fences[i_b];
> >
> > @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >               fences = nfences;
> >       }
> >
> > -     if (sync_file_set_fence(sync_file, fences, i) < 0) {
> > -             kfree(fences);
> > +     if (sync_file_set_fence(sync_file, fences, i) < 0)
> >               goto err;
> > -     }
> >
> >       strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
> >       return sync_file;
> >
> >   err:
> > +     while (i)
> > +             dma_fence_put(fences[--i]);
> > +     kfree(fences);
> >       fput(sync_file->file);
> >       return NULL;
> >
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
@ 2021-06-24 19:43     ` Jason Ekstrand
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Ekstrand @ 2021-06-24 19:43 UTC (permalink / raw)
  To: Christian König
  Cc: Intel GFX, Gustavo Padovan, Maling list - DRI developers

I don't have drm-misc access.  Mind pushing?

On Thu, Jun 24, 2021 at 12:59 PM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
> > Each add_fence() call does a dma_fence_get() on the relevant fence.  In
> > the error path, we weren't calling dma_fence_put() so all those fences
> > got leaked.  Also, in the krealloc_array failure case, we weren't
> > freeing the fences array.  Instead, ensure that i and fences are always
> > zero-initialized and dma_fence_put() all the fences and kfree(fences) on
> > every error path.
> >
> > Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> > Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
> > Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > Cc: Christian König <christian.koenig@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> >   drivers/dma-buf/sync_file.c | 13 +++++++------
> >   1 file changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> > index 20d9bddbb985b..394e6e1e96860 100644
> > --- a/drivers/dma-buf/sync_file.c
> > +++ b/drivers/dma-buf/sync_file.c
> > @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >                                        struct sync_file *b)
> >   {
> >       struct sync_file *sync_file;
> > -     struct dma_fence **fences, **nfences, **a_fences, **b_fences;
> > -     int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> > +     struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
> > +     int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> >
> >       sync_file = sync_file_alloc();
> >       if (!sync_file)
> > @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >        * If a sync_file can only be created with sync_file_merge
> >        * and sync_file_create, this is a reasonable assumption.
> >        */
> > -     for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> > +     for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> >               struct dma_fence *pt_a = a_fences[i_a];
> >               struct dma_fence *pt_b = b_fences[i_b];
> >
> > @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >               fences = nfences;
> >       }
> >
> > -     if (sync_file_set_fence(sync_file, fences, i) < 0) {
> > -             kfree(fences);
> > +     if (sync_file_set_fence(sync_file, fences, i) < 0)
> >               goto err;
> > -     }
> >
> >       strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
> >       return sync_file;
> >
> >   err:
> > +     while (i)
> > +             dma_fence_put(fences[--i]);
> > +     kfree(fences);
> >       fput(sync_file->file);
> >       return NULL;
> >
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for dma-buf/sync_file: Don't leak fences on merge failure
  2021-06-24 17:47 ` [Intel-gfx] " Jason Ekstrand
  (?)
  (?)
@ 2021-06-24 21:59 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-06-24 21:59 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2380 bytes --]

== Series Details ==

Series: dma-buf/sync_file: Don't leak fences on merge failure
URL   : https://patchwork.freedesktop.org/series/91888/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10278 -> Patchwork_20461
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/index.html

Known issues
------------

  Here are the changes found in Patchwork_20461 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-bdw-5557u:       [PASS][1] -> [DMESG-FAIL][2] ([i915#541])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/fi-bdw-5557u/igt@i915_selftest@live@gt_heartbeat.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/fi-bdw-5557u/igt@i915_selftest@live@gt_heartbeat.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload:
    - {fi-tgl-dsi}:       [DMESG-WARN][3] ([i915#1982] / [k.org#205379]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/fi-tgl-dsi/igt@i915_module_load@reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/fi-tgl-dsi/igt@i915_module_load@reload.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
  [k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379


Participating hosts (43 -> 39)
------------------------------

  Missing    (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u 


Build changes
-------------

  * Linux: CI_DRM_10278 -> Patchwork_20461

  CI-20190529: 20190529
  CI_DRM_10278: 33497e95c159f1fe3393f1016b1ec1187eab1589 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6119: a306810ebbc8984bde38a57ef0c33eea394f4e18 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_20461: eca3b2db550829b76113089f8c877a4bee198ab9 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

eca3b2db5508 dma-buf/sync_file: Don't leak fences on merge failure

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/index.html

[-- Attachment #1.2: Type: text/html, Size: 3007 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for dma-buf/sync_file: Don't leak fences on merge failure
  2021-06-24 17:47 ` [Intel-gfx] " Jason Ekstrand
                   ` (2 preceding siblings ...)
  (?)
@ 2021-06-25  6:04 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-06-25  6:04 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 28933 bytes --]

== Series Details ==

Series: dma-buf/sync_file: Don't leak fences on merge failure
URL   : https://patchwork.freedesktop.org/series/91888/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10278_full -> Patchwork_20461_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_20461_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_20461_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_20461_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_whisper@basic-queues-priority-all:
    - shard-tglb:         [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-tglb5/igt@gem_exec_whisper@basic-queues-priority-all.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-tglb8/igt@gem_exec_whisper@basic-queues-priority-all.html

  
#### Warnings ####

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
    - shard-iclb:         [SKIP][3] ([i915#658]) -> [SKIP][4] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb5/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html

  
Known issues
------------

  Here are the changes found in Patchwork_20461_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@legacy-engines-mixed-process:
    - shard-snb:          NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#1099]) +4 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-snb2/igt@gem_ctx_persistence@legacy-engines-mixed-process.html

  * igt@gem_eio@unwedge-stress:
    - shard-skl:          [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#3063])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl10/igt@gem_eio@unwedge-stress.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl7/igt@gem_eio@unwedge-stress.html
    - shard-iclb:         [PASS][8] -> [TIMEOUT][9] ([i915#2369] / [i915#2481] / [i915#3070])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb6/igt@gem_eio@unwedge-stress.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb6/igt@gem_eio@unwedge-stress.html
    - shard-snb:          NOTRUN -> [FAIL][10] ([i915#3354])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-snb7/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb6/igt@gem_exec_fair@basic-none-share@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb6/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][13] ([i915#2842])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl4/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [PASS][14] -> [FAIL][15] ([i915#2842]) +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk3/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk5/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_params@no-vebox:
    - shard-iclb:         NOTRUN -> [SKIP][16] ([fdo#109283])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@gem_exec_params@no-vebox.html

  * igt@gem_exec_reloc@basic-wide-active@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][17] ([i915#3633]) +4 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl4/igt@gem_exec_reloc@basic-wide-active@rcs0.html

  * igt@gem_huc_copy@huc-copy:
    - shard-apl:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#2190])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@gem_huc_copy@huc-copy.html

  * igt@gem_mmap_gtt@cpuset-big-copy-odd:
    - shard-iclb:         [PASS][19] -> [FAIL][20] ([i915#307]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb4/igt@gem_mmap_gtt@cpuset-big-copy-odd.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb5/igt@gem_mmap_gtt@cpuset-big-copy-odd.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][21] ([i915#2658]) +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-snb2/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_render_copy@yf-tiled-to-vebox-yf-tiled:
    - shard-iclb:         NOTRUN -> [SKIP][22] ([i915#768])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@gem_render_copy@yf-tiled-to-vebox-yf-tiled.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-apl:          NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#3323])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-snb:          NOTRUN -> [FAIL][24] ([i915#2724])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-snb7/igt@gem_userptr_blits@vma-merge.html

  * igt@gen9_exec_parse@bb-start-far:
    - shard-iclb:         NOTRUN -> [SKIP][25] ([fdo#112306])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@gen9_exec_parse@bb-start-far.html

  * igt@i915_hangman@engine-error@vecs0:
    - shard-kbl:          NOTRUN -> [SKIP][26] ([fdo#109271]) +101 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl4/igt@i915_hangman@engine-error@vecs0.html

  * igt@i915_pm_rpm@system-suspend-execbuf:
    - shard-skl:          [PASS][27] -> [INCOMPLETE][28] ([i915#151])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl10/igt@i915_pm_rpm@system-suspend-execbuf.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl3/igt@i915_pm_rpm@system-suspend-execbuf.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [PASS][29] -> [DMESG-WARN][30] ([i915#180])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl8/igt@i915_suspend@debugfs-reader.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl3/igt@i915_suspend@debugfs-reader.html

  * igt@kms_big_fb@y-tiled-32bpp-rotate-0:
    - shard-glk:          NOTRUN -> [DMESG-WARN][31] ([i915#118] / [i915#95])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk5/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html

  * igt@kms_chamelium@vga-edid-read:
    - shard-apl:          NOTRUN -> [SKIP][32] ([fdo#109271] / [fdo#111827]) +19 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@kms_chamelium@vga-edid-read.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-glk:          NOTRUN -> [SKIP][33] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk5/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_color_chamelium@pipe-a-degamma:
    - shard-kbl:          NOTRUN -> [SKIP][34] ([fdo#109271] / [fdo#111827]) +12 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl4/igt@kms_color_chamelium@pipe-a-degamma.html

  * igt@kms_color_chamelium@pipe-d-degamma:
    - shard-skl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl10/igt@kms_color_chamelium@pipe-d-degamma.html

  * igt@kms_color_chamelium@pipe-invalid-ctm-matrix-sizes:
    - shard-snb:          NOTRUN -> [SKIP][36] ([fdo#109271] / [fdo#111827]) +19 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-snb7/igt@kms_color_chamelium@pipe-invalid-ctm-matrix-sizes.html

  * igt@kms_content_protection@lic:
    - shard-apl:          NOTRUN -> [TIMEOUT][37] ([i915#1319]) +2 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl2/igt@kms_content_protection@lic.html

  * igt@kms_content_protection@uevent:
    - shard-apl:          NOTRUN -> [FAIL][38] ([i915#2105])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl8/igt@kms_content_protection@uevent.html

  * igt@kms_cursor_crc@pipe-b-cursor-32x32-onscreen:
    - shard-skl:          NOTRUN -> [SKIP][39] ([fdo#109271]) +56 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl10/igt@kms_cursor_crc@pipe-b-cursor-32x32-onscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-256x256-random:
    - shard-glk:          NOTRUN -> [SKIP][40] ([fdo#109271]) +26 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk5/igt@kms_cursor_crc@pipe-d-cursor-256x256-random.html

  * igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][41] ([fdo#109278]) +3 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@kms_cursor_crc@pipe-d-cursor-64x21-sliding.html

  * igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions:
    - shard-iclb:         NOTRUN -> [SKIP][42] ([fdo#109274] / [fdo#109278])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-skl:          [PASS][43] -> [FAIL][44] ([i915#2346])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_flip@flip-vs-expired-vblank@b-edp1:
    - shard-skl:          NOTRUN -> [FAIL][45] ([i915#2122])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl10/igt@kms_flip@flip-vs-expired-vblank@b-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-kbl:          [PASS][46] -> [DMESG-WARN][47] ([i915#180]) +3 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl4/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl7/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip@plain-flip-fb-recreate@c-edp1:
    - shard-skl:          [PASS][48] -> [FAIL][49] ([i915#2122])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl6/igt@kms_flip@plain-flip-fb-recreate@c-edp1.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl2/igt@kms_flip@plain-flip-fb-recreate@c-edp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile:
    - shard-snb:          NOTRUN -> [SKIP][50] ([fdo#109271]) +335 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-snb7/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs:
    - shard-apl:          NOTRUN -> [SKIP][51] ([fdo#109271] / [i915#2672])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt:
    - shard-iclb:         NOTRUN -> [SKIP][52] ([fdo#109280]) +5 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt.html

  * igt@kms_hdr@bpc-switch-dpms:
    - shard-skl:          [PASS][53] -> [FAIL][54] ([i915#1188])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl4/igt@kms_hdr@bpc-switch-dpms.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl10/igt@kms_hdr@bpc-switch-dpms.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-d:
    - shard-skl:          NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#533])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl10/igt@kms_pipe_crc_basic@read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-apl:          NOTRUN -> [FAIL][56] ([fdo#108145] / [i915#265]) +1 similar issue
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
    - shard-kbl:          NOTRUN -> [FAIL][57] ([fdo#108145] / [i915#265])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl4/igt@kms_plane_alpha_blend@pipe-c-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][58] -> [FAIL][59] ([fdo#108145] / [i915#265]) +1 similar issue
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:
    - shard-apl:          NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#658]) +5 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5:
    - shard-kbl:          NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#658])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl6/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
    - shard-glk:          NOTRUN -> [SKIP][62] ([fdo#109271] / [i915#658])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk5/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [PASS][63] -> [SKIP][64] ([fdo#109441]) +3 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb5/igt@kms_psr@psr2_no_drrs.html

  * igt@kms_setmode@clone-exclusive-crtc:
    - shard-skl:          NOTRUN -> [WARN][65] ([i915#2100])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl9/igt@kms_setmode@clone-exclusive-crtc.html

  * igt@kms_vblank@pipe-d-ts-continuation-idle:
    - shard-apl:          NOTRUN -> [SKIP][66] ([fdo#109271]) +214 similar issues
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl2/igt@kms_vblank@pipe-d-ts-continuation-idle.html

  * igt@kms_vblank@pipe-d-wait-idle:
    - shard-kbl:          NOTRUN -> [SKIP][67] ([fdo#109271] / [i915#533])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl6/igt@kms_vblank@pipe-d-wait-idle.html
    - shard-apl:          NOTRUN -> [SKIP][68] ([fdo#109271] / [i915#533]) +2 similar issues
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl2/igt@kms_vblank@pipe-d-wait-idle.html

  * igt@nouveau_crc@pipe-c-source-outp-complete:
    - shard-iclb:         NOTRUN -> [SKIP][69] ([i915#2530])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@nouveau_crc@pipe-c-source-outp-complete.html

  
#### Possible fixes ####

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-tglb:         [FAIL][70] ([i915#2842]) -> [PASS][71]
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-tglb2/igt@gem_exec_fair@basic-none-share@rcs0.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-tglb3/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_mmap_gtt@big-copy-xy:
    - shard-skl:          [FAIL][72] ([i915#307]) -> [PASS][73]
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@gem_mmap_gtt@big-copy-xy.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl4/igt@gem_mmap_gtt@big-copy-xy.html

  * igt@kms_big_fb@linear-64bpp-rotate-0:
    - shard-iclb:         [DMESG-WARN][74] ([i915#3621]) -> [PASS][75]
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb1/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@kms_big_fb@linear-64bpp-rotate-0.html

  * igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge:
    - shard-skl:          [DMESG-WARN][76] ([i915#1982]) -> [PASS][77]
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl9/igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl9/igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-kbl:          [INCOMPLETE][78] ([i915#155] / [i915#180] / [i915#636]) -> [PASS][79]
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl7/igt@kms_fbcon_fbt@fbc-suspend.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl6/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ac-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][80] ([i915#2122]) -> [PASS][81]
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk7/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ac-hdmi-a1-hdmi-a2.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk6/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ac-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][82] ([i915#79]) -> [PASS][83]
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-glk4/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-glk4/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-apl:          [DMESG-WARN][84] ([i915#180]) -> [PASS][85] +2 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl1/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl1/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-kbl:          [DMESG-WARN][86] ([i915#180]) -> [PASS][87] +2 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl7/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl2/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_flip@plain-flip-ts-check@c-edp1:
    - shard-skl:          [FAIL][88] ([i915#2122]) -> [PASS][89]
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl6/igt@kms_flip@plain-flip-ts-check@c-edp1.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl7/igt@kms_flip@plain-flip-ts-check@c-edp1.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-skl:          [FAIL][90] ([i915#1188]) -> [PASS][91] +1 similar issue
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl7/igt@kms_hdr@bpc-switch-suspend.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl1/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [FAIL][92] ([fdo#108145] / [i915#265]) -> [PASS][93]
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-skl3/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-skl9/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_basic:
    - shard-iclb:         [SKIP][94] ([fdo#109441]) -> [PASS][95] +1 similar issue
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb6/igt@kms_psr@psr2_basic.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb2/igt@kms_psr@psr2_basic.html

  
#### Warnings ####

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][96] ([i915#658]) -> [SKIP][97] ([i915#588])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb4/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_rc6_residency@rc6-fence:
    - shard-iclb:         [WARN][98] ([i915#1804] / [i915#2684]) -> [WARN][99] ([i915#2684]) +1 similar issue
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb7/igt@i915_pm_rc6_residency@rc6-fence.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb8/igt@i915_pm_rc6_residency@rc6-fence.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
    - shard-iclb:         [SKIP][100] -> [SKIP][101] ([i915#658])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-iclb1/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][102], [FAIL][103], [FAIL][104], [FAIL][105], [FAIL][106], [FAIL][107], [FAIL][108], [FAIL][109]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#92]) -> ([FAIL][110], [FAIL][111], [FAIL][112], [FAIL][113], [FAIL][114], [FAIL][115]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl2/igt@runner@aborted.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl2/igt@runner@aborted.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl3/igt@runner@aborted.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl7/igt@runner@aborted.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-kbl7/igt@runner@aborted.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl2/igt@runner@aborted.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl2/igt@runner@aborted.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl3/igt@runner@aborted.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl2/igt@runner@aborted.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl7/igt@runner@aborted.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-kbl2/igt@runner@aborted.html
    - shard-apl:          ([FAIL][116], [FAIL][117], [FAIL][118], [FAIL][119], [FAIL][120]) ([fdo#109271] / [i915#180] / [i915#3363]) -> [FAIL][121] ([i915#180] / [i915#3363])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@runner@aborted.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl8/igt@runner@aborted.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@runner@aborted.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl1/igt@runner@aborted.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10278/shard-apl3/igt@runner@aborted.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/shard-apl3/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112306]: https://bugs.freedesktop.org/show_bug.cgi?id=112306
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
  [i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2100]: https://gitlab.freedesktop.org/drm/intel/issues/2100
  [i915#2105]: https://gitlab.freedesktop.org/drm/intel/issues/2105
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369
  [i915#2481]: https://gitlab.freedesktop.org/drm/intel/issues/2481
  [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
  [i915#2724]: https://gitlab.freedesktop.org/drm/intel/issues/2724
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
  [i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
  [i915#307]: https://gitlab.freedesktop.org/drm/intel/issues/307
  [i915#3070]: https://gitlab.freedesktop.org/drm/intel/issues/3070
  [i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
  [i915#3354]: https://gitlab.freedesktop.org/drm/intel/issues/3354
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#3621]: https://gitlab.freedesktop.org/drm/intel/issues/3621
  [i915#3633]: https://gitlab.freedesktop.org/drm/intel/issues/3633
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
  [i915#636]: https://gitlab.freedesktop.org/drm/intel/issues/636
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#768]: https://gitlab.freedesktop.org/drm/intel/issues/768
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_10278 -> Patchwork_20461

  CI-20190529: 20190529
  CI_DRM_10278: 33497e95c159f1fe3393f1016b1ec1187eab1589 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6119: a306810ebbc8984bde38a57ef0c33eea394f4e18 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_20461: eca3b2db550829b76113089f8c877a4bee198ab9 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20461/index.html

[-- Attachment #1.2: Type: text/html, Size: 35832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
  2021-06-24 19:43     ` [Intel-gfx] " Jason Ekstrand
@ 2021-07-12 11:37       ` Christian König
  -1 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2021-07-12 11:37 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: Intel GFX, Gustavo Padovan, Maling list - DRI developers

Sorry for the vacation and sick leave induced delay.

I've just pushed this to drm-misc-fixes.

Thanks,
Christian.

Am 24.06.21 um 21:43 schrieb Jason Ekstrand:
> I don't have drm-misc access.  Mind pushing?
>
> On Thu, Jun 24, 2021 at 12:59 PM Christian König
> <christian.koenig@amd.com> wrote:
>> Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
>>> Each add_fence() call does a dma_fence_get() on the relevant fence.  In
>>> the error path, we weren't calling dma_fence_put() so all those fences
>>> got leaked.  Also, in the krealloc_array failure case, we weren't
>>> freeing the fences array.  Instead, ensure that i and fences are always
>>> zero-initialized and dma_fence_put() all the fences and kfree(fences) on
>>> every error path.
>>>
>>> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
>>> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
>>> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>> Cc: Christian König <christian.koenig@amd.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>
>>> ---
>>>    drivers/dma-buf/sync_file.c | 13 +++++++------
>>>    1 file changed, 7 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
>>> index 20d9bddbb985b..394e6e1e96860 100644
>>> --- a/drivers/dma-buf/sync_file.c
>>> +++ b/drivers/dma-buf/sync_file.c
>>> @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>>>                                         struct sync_file *b)
>>>    {
>>>        struct sync_file *sync_file;
>>> -     struct dma_fence **fences, **nfences, **a_fences, **b_fences;
>>> -     int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
>>> +     struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
>>> +     int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
>>>
>>>        sync_file = sync_file_alloc();
>>>        if (!sync_file)
>>> @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>>>         * If a sync_file can only be created with sync_file_merge
>>>         * and sync_file_create, this is a reasonable assumption.
>>>         */
>>> -     for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
>>> +     for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
>>>                struct dma_fence *pt_a = a_fences[i_a];
>>>                struct dma_fence *pt_b = b_fences[i_b];
>>>
>>> @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>>>                fences = nfences;
>>>        }
>>>
>>> -     if (sync_file_set_fence(sync_file, fences, i) < 0) {
>>> -             kfree(fences);
>>> +     if (sync_file_set_fence(sync_file, fences, i) < 0)
>>>                goto err;
>>> -     }
>>>
>>>        strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
>>>        return sync_file;
>>>
>>>    err:
>>> +     while (i)
>>> +             dma_fence_put(fences[--i]);
>>> +     kfree(fences);
>>>        fput(sync_file->file);
>>>        return NULL;
>>>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
@ 2021-07-12 11:37       ` Christian König
  0 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2021-07-12 11:37 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: Intel GFX, Gustavo Padovan, Maling list - DRI developers

Sorry for the vacation and sick leave induced delay.

I've just pushed this to drm-misc-fixes.

Thanks,
Christian.

Am 24.06.21 um 21:43 schrieb Jason Ekstrand:
> I don't have drm-misc access.  Mind pushing?
>
> On Thu, Jun 24, 2021 at 12:59 PM Christian König
> <christian.koenig@amd.com> wrote:
>> Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
>>> Each add_fence() call does a dma_fence_get() on the relevant fence.  In
>>> the error path, we weren't calling dma_fence_put() so all those fences
>>> got leaked.  Also, in the krealloc_array failure case, we weren't
>>> freeing the fences array.  Instead, ensure that i and fences are always
>>> zero-initialized and dma_fence_put() all the fences and kfree(fences) on
>>> every error path.
>>>
>>> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
>>> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
>>> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>> Cc: Christian König <christian.koenig@amd.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>
>>> ---
>>>    drivers/dma-buf/sync_file.c | 13 +++++++------
>>>    1 file changed, 7 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
>>> index 20d9bddbb985b..394e6e1e96860 100644
>>> --- a/drivers/dma-buf/sync_file.c
>>> +++ b/drivers/dma-buf/sync_file.c
>>> @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>>>                                         struct sync_file *b)
>>>    {
>>>        struct sync_file *sync_file;
>>> -     struct dma_fence **fences, **nfences, **a_fences, **b_fences;
>>> -     int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
>>> +     struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
>>> +     int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
>>>
>>>        sync_file = sync_file_alloc();
>>>        if (!sync_file)
>>> @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>>>         * If a sync_file can only be created with sync_file_merge
>>>         * and sync_file_create, this is a reasonable assumption.
>>>         */
>>> -     for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
>>> +     for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
>>>                struct dma_fence *pt_a = a_fences[i_a];
>>>                struct dma_fence *pt_b = b_fences[i_b];
>>>
>>> @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
>>>                fences = nfences;
>>>        }
>>>
>>> -     if (sync_file_set_fence(sync_file, fences, i) < 0) {
>>> -             kfree(fences);
>>> +     if (sync_file_set_fence(sync_file, fences, i) < 0)
>>>                goto err;
>>> -     }
>>>
>>>        strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
>>>        return sync_file;
>>>
>>>    err:
>>> +     while (i)
>>> +             dma_fence_put(fences[--i]);
>>> +     kfree(fences);
>>>        fput(sync_file->file);
>>>        return NULL;
>>>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
  2021-07-12 11:37       ` [Intel-gfx] " Christian König
@ 2021-07-12 13:38         ` Jason Ekstrand
  -1 siblings, 0 replies; 12+ messages in thread
From: Jason Ekstrand @ 2021-07-12 13:38 UTC (permalink / raw)
  To: Christian König
  Cc: Intel GFX, Gustavo Padovan, Maling list - DRI developers

No worries.  Thanks for pushing!

On Mon, Jul 12, 2021 at 6:37 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Sorry for the vacation and sick leave induced delay.
>
> I've just pushed this to drm-misc-fixes.
>
> Thanks,
> Christian.
>
> Am 24.06.21 um 21:43 schrieb Jason Ekstrand:
> > I don't have drm-misc access.  Mind pushing?
> >
> > On Thu, Jun 24, 2021 at 12:59 PM Christian König
> > <christian.koenig@amd.com> wrote:
> >> Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
> >>> Each add_fence() call does a dma_fence_get() on the relevant fence.  In
> >>> the error path, we weren't calling dma_fence_put() so all those fences
> >>> got leaked.  Also, in the krealloc_array failure case, we weren't
> >>> freeing the fences array.  Instead, ensure that i and fences are always
> >>> zero-initialized and dma_fence_put() all the fences and kfree(fences) on
> >>> every error path.
> >>>
> >>> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> >>> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
> >>> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >>> Cc: Christian König <christian.koenig@amd.com>
> >> Reviewed-by: Christian König <christian.koenig@amd.com>
> >>
> >>> ---
> >>>    drivers/dma-buf/sync_file.c | 13 +++++++------
> >>>    1 file changed, 7 insertions(+), 6 deletions(-)
> >>>
> >>> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> >>> index 20d9bddbb985b..394e6e1e96860 100644
> >>> --- a/drivers/dma-buf/sync_file.c
> >>> +++ b/drivers/dma-buf/sync_file.c
> >>> @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >>>                                         struct sync_file *b)
> >>>    {
> >>>        struct sync_file *sync_file;
> >>> -     struct dma_fence **fences, **nfences, **a_fences, **b_fences;
> >>> -     int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> >>> +     struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
> >>> +     int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> >>>
> >>>        sync_file = sync_file_alloc();
> >>>        if (!sync_file)
> >>> @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >>>         * If a sync_file can only be created with sync_file_merge
> >>>         * and sync_file_create, this is a reasonable assumption.
> >>>         */
> >>> -     for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> >>> +     for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> >>>                struct dma_fence *pt_a = a_fences[i_a];
> >>>                struct dma_fence *pt_b = b_fences[i_b];
> >>>
> >>> @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >>>                fences = nfences;
> >>>        }
> >>>
> >>> -     if (sync_file_set_fence(sync_file, fences, i) < 0) {
> >>> -             kfree(fences);
> >>> +     if (sync_file_set_fence(sync_file, fences, i) < 0)
> >>>                goto err;
> >>> -     }
> >>>
> >>>        strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
> >>>        return sync_file;
> >>>
> >>>    err:
> >>> +     while (i)
> >>> +             dma_fence_put(fences[--i]);
> >>> +     kfree(fences);
> >>>        fput(sync_file->file);
> >>>        return NULL;
> >>>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] dma-buf/sync_file: Don't leak fences on merge failure
@ 2021-07-12 13:38         ` Jason Ekstrand
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Ekstrand @ 2021-07-12 13:38 UTC (permalink / raw)
  To: Christian König
  Cc: Intel GFX, Gustavo Padovan, Maling list - DRI developers

No worries.  Thanks for pushing!

On Mon, Jul 12, 2021 at 6:37 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Sorry for the vacation and sick leave induced delay.
>
> I've just pushed this to drm-misc-fixes.
>
> Thanks,
> Christian.
>
> Am 24.06.21 um 21:43 schrieb Jason Ekstrand:
> > I don't have drm-misc access.  Mind pushing?
> >
> > On Thu, Jun 24, 2021 at 12:59 PM Christian König
> > <christian.koenig@amd.com> wrote:
> >> Am 24.06.21 um 19:47 schrieb Jason Ekstrand:
> >>> Each add_fence() call does a dma_fence_get() on the relevant fence.  In
> >>> the error path, we weren't calling dma_fence_put() so all those fences
> >>> got leaked.  Also, in the krealloc_array failure case, we weren't
> >>> freeing the fences array.  Instead, ensure that i and fences are always
> >>> zero-initialized and dma_fence_put() all the fences and kfree(fences) on
> >>> every error path.
> >>>
> >>> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> >>> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
> >>> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >>> Cc: Christian König <christian.koenig@amd.com>
> >> Reviewed-by: Christian König <christian.koenig@amd.com>
> >>
> >>> ---
> >>>    drivers/dma-buf/sync_file.c | 13 +++++++------
> >>>    1 file changed, 7 insertions(+), 6 deletions(-)
> >>>
> >>> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> >>> index 20d9bddbb985b..394e6e1e96860 100644
> >>> --- a/drivers/dma-buf/sync_file.c
> >>> +++ b/drivers/dma-buf/sync_file.c
> >>> @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >>>                                         struct sync_file *b)
> >>>    {
> >>>        struct sync_file *sync_file;
> >>> -     struct dma_fence **fences, **nfences, **a_fences, **b_fences;
> >>> -     int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> >>> +     struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
> >>> +     int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
> >>>
> >>>        sync_file = sync_file_alloc();
> >>>        if (!sync_file)
> >>> @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >>>         * If a sync_file can only be created with sync_file_merge
> >>>         * and sync_file_create, this is a reasonable assumption.
> >>>         */
> >>> -     for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> >>> +     for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
> >>>                struct dma_fence *pt_a = a_fences[i_a];
> >>>                struct dma_fence *pt_b = b_fences[i_b];
> >>>
> >>> @@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
> >>>                fences = nfences;
> >>>        }
> >>>
> >>> -     if (sync_file_set_fence(sync_file, fences, i) < 0) {
> >>> -             kfree(fences);
> >>> +     if (sync_file_set_fence(sync_file, fences, i) < 0)
> >>>                goto err;
> >>> -     }
> >>>
> >>>        strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
> >>>        return sync_file;
> >>>
> >>>    err:
> >>> +     while (i)
> >>> +             dma_fence_put(fences[--i]);
> >>> +     kfree(fences);
> >>>        fput(sync_file->file);
> >>>        return NULL;
> >>>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-07-12 13:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 17:47 [PATCH] dma-buf/sync_file: Don't leak fences on merge failure Jason Ekstrand
2021-06-24 17:47 ` [Intel-gfx] " Jason Ekstrand
2021-06-24 17:58 ` Christian König
2021-06-24 17:58   ` [Intel-gfx] " Christian König
2021-06-24 19:43   ` Jason Ekstrand
2021-06-24 19:43     ` [Intel-gfx] " Jason Ekstrand
2021-07-12 11:37     ` Christian König
2021-07-12 11:37       ` [Intel-gfx] " Christian König
2021-07-12 13:38       ` Jason Ekstrand
2021-07-12 13:38         ` [Intel-gfx] " Jason Ekstrand
2021-06-24 21:59 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-06-25  6:04 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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.