All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: don't leak global_timeline
@ 2016-11-16 19:32 Matthew Auld
  2016-11-16 20:46 ` ✗ Fi.CI.BAT: warning for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Matthew Auld @ 2016-11-16 19:32 UTC (permalink / raw)
  To: intel-gfx

We need to clean up the global_timeline in i915_gem_load_cleanup.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3fb5e66..c440e72 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4557,6 +4557,8 @@ void i915_gem_load_cleanup(struct drm_device *dev)
 
 	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
 
+	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
+
 	kmem_cache_destroy(dev_priv->dependencies);
 	kmem_cache_destroy(dev_priv->requests);
 	kmem_cache_destroy(dev_priv->vmas);
-- 
2.7.4

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

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

* ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
@ 2016-11-16 20:46 ` Patchwork
  2016-11-16 20:57 ` [PATCH] " Chris Wilson
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2016-11-16 20:46 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: don't leak global_timeline
URL   : https://patchwork.freedesktop.org/series/15439/
State : warning

== Summary ==

Series 15439v1 drm/i915: don't leak global_timeline
https://patchwork.freedesktop.org/api/1.0/series/15439/revisions/1/mbox/

Test drv_module_reload_basic:
                pass       -> DMESG-WARN (fi-ivb-3520m)
                pass       -> DMESG-WARN (fi-snb-2520m)
                pass       -> DMESG-WARN (fi-skl-6260u)
                pass       -> DMESG-WARN (fi-byt-j1900)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                pass       -> DMESG-WARN (fi-hsw-4770)
                pass       -> DMESG-WARN (fi-skl-6770hq)
                pass       -> DMESG-WARN (fi-kbl-7200u)
                pass       -> DMESG-WARN (fi-ivb-3770)
                pass       -> DMESG-WARN (fi-bsw-n3050)
                pass       -> DMESG-WARN (fi-bdw-5557u)
                pass       -> DMESG-WARN (fi-hsw-4770r)
                pass       -> DMESG-WARN (fi-snb-2600)
                pass       -> DMESG-WARN (fi-ilk-650)
                pass       -> DMESG-WARN (fi-byt-n2820)

fi-bdw-5557u     total:244  pass:228  dwarn:1   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:203  dwarn:1   dfail:0   fail:0   skip:40 
fi-byt-j1900     total:244  pass:215  dwarn:1   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:211  dwarn:1   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:223  dwarn:1   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:223  dwarn:1   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:190  dwarn:1   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:229  dwarn:1   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:244  pass:229  dwarn:1   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:244  pass:211  dwarn:1   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:210  dwarn:1   dfail:0   fail:0   skip:33 

6294f67611ebe69006c0e85c372efadcac8e9d66 drm-intel-nightly: 2016y-11m-16d-09h-57m-25s UTC integration manifest
97179ba drm/i915: don't leak global_timeline

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3028/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: don't leak global_timeline
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
  2016-11-16 20:46 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2016-11-16 20:57 ` Chris Wilson
  2016-11-17  8:48 ` Daniel Vetter
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2016-11-16 20:57 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

On Wed, Nov 16, 2016 at 07:32:49PM +0000, Matthew Auld wrote:
> We need to clean up the global_timeline in i915_gem_load_cleanup.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3fb5e66..c440e72 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4557,6 +4557,8 @@ void i915_gem_load_cleanup(struct drm_device *dev)
>  
>  	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
>  
> +	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);

Once upon a time the global timeline didn't allocate.

However, to free the timeline I assert we hold the struct_mutex for
manipulatingn the timelines list (that's important for the client
timelines) and we don't hold the struct_mutex here.

Give it a mutex_lock() and a WARN_ON(!list_empty(&dev_priv->gt.timelines));
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: don't leak global_timeline
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
  2016-11-16 20:46 ` ✗ Fi.CI.BAT: warning for " Patchwork
  2016-11-16 20:57 ` [PATCH] " Chris Wilson
@ 2016-11-17  8:48 ` Daniel Vetter
  2016-11-17  8:54   ` Chris Wilson
  2016-11-17 20:20 ` Matthew Auld
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Daniel Vetter @ 2016-11-17  8:48 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

On Wed, Nov 16, 2016 at 07:32:49PM +0000, Matthew Auld wrote:
> We need to clean up the global_timeline in i915_gem_load_cleanup.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>

Fixes: line probably missing? And why was that not caught when the
original patch landed?
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3fb5e66..c440e72 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4557,6 +4557,8 @@ void i915_gem_load_cleanup(struct drm_device *dev)
>  
>  	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
>  
> +	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
> +
>  	kmem_cache_destroy(dev_priv->dependencies);
>  	kmem_cache_destroy(dev_priv->requests);
>  	kmem_cache_destroy(dev_priv->vmas);
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: don't leak global_timeline
  2016-11-17  8:48 ` Daniel Vetter
@ 2016-11-17  8:54   ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2016-11-17  8:54 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, Matthew Auld

On Thu, Nov 17, 2016 at 09:48:18AM +0100, Daniel Vetter wrote:
> On Wed, Nov 16, 2016 at 07:32:49PM +0000, Matthew Auld wrote:
> > We need to clean up the global_timeline in i915_gem_load_cleanup.
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> 
> Fixes: line probably missing? And why was that not caught when the
> original patch landed?

It's a just a missing free of a few bytes. This would require kmemleak.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/i915: don't leak global_timeline
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
                   ` (2 preceding siblings ...)
  2016-11-17  8:48 ` Daniel Vetter
@ 2016-11-17 20:20 ` Matthew Auld
  2016-11-17 20:24   ` Chris Wilson
  2016-11-17 20:38 ` Matthew Auld
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Matthew Auld @ 2016-11-17 20:20 UTC (permalink / raw)
  To: intel-gfx

We need to clean up the global_timeline in i915_gem_load_cleanup.

v2: don't forget about the struct_mutex, and also WARN_ON if we have any
remaining timelines before purging the global_timeline.

Fixes: 73cb97010d4f ("drm/i915: Combine seqno + tracking into a global timeline struct")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3fb5e66e4d65..f507e14d6231 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4556,6 +4556,11 @@ void i915_gem_load_cleanup(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 
 	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
+	WARN_ON(!list_empty(&dev_priv->gt.timelines));
+
+	mutex_lock(&dev_priv->drm.struct_mutex);
+	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
+	mutex_unlock(&dev_priv->drm.struct_mutex);
 
 	kmem_cache_destroy(dev_priv->dependencies);
 	kmem_cache_destroy(dev_priv->requests);
-- 
2.7.4

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

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

* Re: [PATCH] drm/i915: don't leak global_timeline
  2016-11-17 20:20 ` Matthew Auld
@ 2016-11-17 20:24   ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2016-11-17 20:24 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

On Thu, Nov 17, 2016 at 08:20:05PM +0000, Matthew Auld wrote:
> We need to clean up the global_timeline in i915_gem_load_cleanup.
> 
> v2: don't forget about the struct_mutex, and also WARN_ON if we have any
> remaining timelines before purging the global_timeline.
> 
> Fixes: 73cb97010d4f ("drm/i915: Combine seqno + tracking into a global timeline struct")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3fb5e66e4d65..f507e14d6231 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4556,6 +4556,11 @@ void i915_gem_load_cleanup(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  
>  	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
> +	WARN_ON(!list_empty(&dev_priv->gt.timelines));
> +
> +	mutex_lock(&dev_priv->drm.struct_mutex);
> +	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
> +	mutex_unlock(&dev_priv->drm.struct_mutex);

Remove the global timeline from the list then warn... :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/i915: don't leak global_timeline
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
                   ` (3 preceding siblings ...)
  2016-11-17 20:20 ` Matthew Auld
@ 2016-11-17 20:38 ` Matthew Auld
  2016-11-17 20:57   ` Chris Wilson
  2016-11-17 20:46 ` ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev2) Patchwork
  2016-11-18  6:15 ` ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev3) Patchwork
  6 siblings, 1 reply; 11+ messages in thread
From: Matthew Auld @ 2016-11-17 20:38 UTC (permalink / raw)
  To: intel-gfx

We need to clean up the global_timeline in i915_gem_load_cleanup.

v2: don't forget about the struct_mutex, and also WARN_ON if we have any
remaining timelines before purging the global_timeline.

v3: it might be a good idea to first remove the global_timeline...duh!

Fixes: 73cb97010d4f ("drm/i915: Combine seqno + tracking into a global timeline struct")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3fb5e66e4d65..b7a8c8349ccb 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4557,6 +4557,12 @@ void i915_gem_load_cleanup(struct drm_device *dev)
 
 	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
 
+	mutex_lock(&dev_priv->drm.struct_mutex);
+	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+
+	WARN_ON(!list_empty(&dev_priv->gt.timelines));
+
 	kmem_cache_destroy(dev_priv->dependencies);
 	kmem_cache_destroy(dev_priv->requests);
 	kmem_cache_destroy(dev_priv->vmas);
-- 
2.7.4

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

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

* ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev2)
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
                   ` (4 preceding siblings ...)
  2016-11-17 20:38 ` Matthew Auld
@ 2016-11-17 20:46 ` Patchwork
  2016-11-18  6:15 ` ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev3) Patchwork
  6 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2016-11-17 20:46 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: don't leak global_timeline (rev2)
URL   : https://patchwork.freedesktop.org/series/15439/
State : warning

== Summary ==

Series 15439v2 drm/i915: don't leak global_timeline
https://patchwork.freedesktop.org/api/1.0/series/15439/revisions/2/mbox/

Test drv_module_reload_basic:
                pass       -> DMESG-WARN (fi-ivb-3770)
                pass       -> DMESG-WARN (fi-hsw-4770r)
                pass       -> DMESG-WARN (fi-byt-n2820)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                pass       -> DMESG-WARN (fi-hsw-4770)
                pass       -> DMESG-WARN (fi-byt-j1900)
                pass       -> DMESG-WARN (fi-bsw-n3050)
                pass       -> DMESG-WARN (fi-ilk-650)
                pass       -> DMESG-WARN (fi-kbl-7200u)
                pass       -> DMESG-WARN (fi-snb-2600)
                pass       -> DMESG-WARN (fi-skl-6260u)
                pass       -> DMESG-WARN (fi-snb-2520m)
                pass       -> DMESG-WARN (fi-ivb-3520m)
                pass       -> DMESG-WARN (fi-bdw-5557u)

fi-bdw-5557u     total:244  pass:228  dwarn:1   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:203  dwarn:1   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:244  pass:215  dwarn:1   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:244  pass:215  dwarn:1   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:211  dwarn:1   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:223  dwarn:1   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:223  dwarn:1   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:190  dwarn:1   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:229  dwarn:1   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:244  pass:229  dwarn:1   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:244  pass:211  dwarn:1   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:210  dwarn:1   dfail:0   fail:0   skip:33 

4f5493e90cc50f1c6391c4f389f7a79c8fe52355 drm-intel-nightly: 2016y-11m-17d-15h-37m-59s UTC integration manifest
d113c2a drm/i915: don't leak global_timeline

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3043/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: don't leak global_timeline
  2016-11-17 20:38 ` Matthew Auld
@ 2016-11-17 20:57   ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2016-11-17 20:57 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

On Thu, Nov 17, 2016 at 08:38:07PM +0000, Matthew Auld wrote:
> We need to clean up the global_timeline in i915_gem_load_cleanup.
> 
> v2: don't forget about the struct_mutex, and also WARN_ON if we have any
> remaining timelines before purging the global_timeline.
> 
> v3: it might be a good idea to first remove the global_timeline...duh!
> 
> Fixes: 73cb97010d4f ("drm/i915: Combine seqno + tracking into a global timeline struct")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3fb5e66e4d65..b7a8c8349ccb 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4557,6 +4557,12 @@ void i915_gem_load_cleanup(struct drm_device *dev)
>  
>  	WARN_ON(!llist_empty(&dev_priv->mm.free_list));
>  
> +	mutex_lock(&dev_priv->drm.struct_mutex);
> +	i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
> +	mutex_unlock(&dev_priv->drm.struct_mutex);
> +
> +	WARN_ON(!list_empty(&dev_priv->gt.timelines));

I would have plonked this under the mutex, then it mirrors the 

mutex_lock()
INIT_LIST_HEAD()
i915_gem_timeline_init(&dev_priv->gt.global_timeline);
mutex_unlock()

we do at the start.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

I'll surreptiously do that, and send this pair to CI together since the
order is important to avoid adding this WARN before the fix.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev3)
  2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
                   ` (5 preceding siblings ...)
  2016-11-17 20:46 ` ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev2) Patchwork
@ 2016-11-18  6:15 ` Patchwork
  6 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2016-11-18  6:15 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: don't leak global_timeline (rev3)
URL   : https://patchwork.freedesktop.org/series/15439/
State : warning

== Summary ==

Series 15439v3 drm/i915: don't leak global_timeline
https://patchwork.freedesktop.org/api/1.0/series/15439/revisions/3/mbox/

Test drv_module_reload_basic:
                pass       -> DMESG-WARN (fi-ivb-3520m)
                pass       -> DMESG-WARN (fi-ivb-3770)
                pass       -> DMESG-WARN (fi-snb-2600)
                pass       -> DMESG-WARN (fi-byt-n2820)
                pass       -> DMESG-WARN (fi-bdw-5557u)
                pass       -> DMESG-WARN (fi-bsw-n3050)
                pass       -> DMESG-WARN (fi-byt-j1900)
                pass       -> DMESG-WARN (fi-snb-2520m)
                pass       -> DMESG-WARN (fi-hsw-4770r)
                pass       -> DMESG-WARN (fi-skl-6260u)
                pass       -> DMESG-WARN (fi-ilk-650)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                pass       -> DMESG-WARN (fi-hsw-4770)
                pass       -> DMESG-WARN (fi-skl-6770hq)
                pass       -> DMESG-WARN (fi-kbl-7200u)
                pass       -> DMESG-WARN (fi-bxt-t5700)
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> DMESG-WARN (fi-skl-6770hq)

fi-bdw-5557u     total:244  pass:228  dwarn:1   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:203  dwarn:1   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:244  pass:215  dwarn:1   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:244  pass:215  dwarn:1   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:211  dwarn:1   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:223  dwarn:1   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:223  dwarn:1   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:190  dwarn:1   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:229  dwarn:1   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:244  pass:228  dwarn:2   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:244  pass:211  dwarn:1   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:210  dwarn:1   dfail:0   fail:0   skip:33 

7fc9e0c9ebb67261bc86264eb7592a9e8d12e7fe drm-intel-nightly: 2016y-11m-17d-20h-31m-28s UTC integration manifest
db22805 drm/i915: don't leak global_timeline

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3044/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-11-18  6:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 19:32 [PATCH] drm/i915: don't leak global_timeline Matthew Auld
2016-11-16 20:46 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-11-16 20:57 ` [PATCH] " Chris Wilson
2016-11-17  8:48 ` Daniel Vetter
2016-11-17  8:54   ` Chris Wilson
2016-11-17 20:20 ` Matthew Auld
2016-11-17 20:24   ` Chris Wilson
2016-11-17 20:38 ` Matthew Auld
2016-11-17 20:57   ` Chris Wilson
2016-11-17 20:46 ` ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev2) Patchwork
2016-11-18  6:15 ` ✗ Fi.CI.BAT: warning for drm/i915: don't leak global_timeline (rev3) 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.