* [PATCH] drm/i915: fix aliasing_ppgtt leak
@ 2016-08-05 18:04 Matthew Auld
2016-08-05 18:18 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Auld @ 2016-08-05 18:04 UTC (permalink / raw)
To: intel-gfx
In i915_ggtt_cleanup_hw we need to remember to free aliasing_ppgtt. This
fixes the following kmemleak message:
unreferenced object 0xffff880213cca000 (size 8192):
comm "modprobe", pid 1298, jiffies 4294745402 (age 703.930s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff817c808e>] kmemleak_alloc+0x4e/0xb0
[<ffffffff8121f9c2>] kmem_cache_alloc_trace+0x142/0x1d0
[<ffffffffa06d11ef>] i915_gem_init_ggtt+0x10f/0x210 [i915]
[<ffffffffa06d71bb>] i915_gem_init+0x5b/0xd0 [i915]
[<ffffffffa069749a>] i915_driver_load+0x97a/0x1460 [i915]
[<ffffffffa06a26ef>] i915_pci_probe+0x4f/0x70 [i915]
[<ffffffff81423015>] local_pci_probe+0x45/0xa0
[<ffffffff81424463>] pci_device_probe+0x103/0x150
[<ffffffff81515e6c>] driver_probe_device+0x22c/0x440
[<ffffffff81516151>] __driver_attach+0xd1/0xf0
[<ffffffff8151379c>] bus_for_each_dev+0x6c/0xc0
[<ffffffff8151555e>] driver_attach+0x1e/0x20
[<ffffffff81514fa3>] bus_add_driver+0x1c3/0x280
[<ffffffff81516aa0>] driver_register+0x60/0xe0
[<ffffffff8142297c>] __pci_register_driver+0x4c/0x50
[<ffffffffa013605b>] 0xffffffffa013605b
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 8b4f2f3..18c7c96 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2797,6 +2797,7 @@ void i915_ggtt_cleanup_hw(struct drm_i915_private *dev_priv)
struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
ppgtt->base.cleanup(&ppgtt->base);
+ kfree(ppgtt);
}
i915_gem_cleanup_stolen(&dev_priv->drm);
--
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] 3+ messages in thread
* Re: [PATCH] drm/i915: fix aliasing_ppgtt leak
2016-08-05 18:04 [PATCH] drm/i915: fix aliasing_ppgtt leak Matthew Auld
@ 2016-08-05 18:18 ` Chris Wilson
2016-08-05 20:40 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2016-08-05 18:18 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
On Fri, Aug 05, 2016 at 07:04:40PM +0100, Matthew Auld wrote:
> In i915_ggtt_cleanup_hw we need to remember to free aliasing_ppgtt. This
> fixes the following kmemleak message:
>
> unreferenced object 0xffff880213cca000 (size 8192):
> comm "modprobe", pid 1298, jiffies 4294745402 (age 703.930s)
> hex dump (first 32 bytes):
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> backtrace:
> [<ffffffff817c808e>] kmemleak_alloc+0x4e/0xb0
> [<ffffffff8121f9c2>] kmem_cache_alloc_trace+0x142/0x1d0
> [<ffffffffa06d11ef>] i915_gem_init_ggtt+0x10f/0x210 [i915]
> [<ffffffffa06d71bb>] i915_gem_init+0x5b/0xd0 [i915]
> [<ffffffffa069749a>] i915_driver_load+0x97a/0x1460 [i915]
> [<ffffffffa06a26ef>] i915_pci_probe+0x4f/0x70 [i915]
> [<ffffffff81423015>] local_pci_probe+0x45/0xa0
> [<ffffffff81424463>] pci_device_probe+0x103/0x150
> [<ffffffff81515e6c>] driver_probe_device+0x22c/0x440
> [<ffffffff81516151>] __driver_attach+0xd1/0xf0
> [<ffffffff8151379c>] bus_for_each_dev+0x6c/0xc0
> [<ffffffff8151555e>] driver_attach+0x1e/0x20
> [<ffffffff81514fa3>] bus_add_driver+0x1c3/0x280
> [<ffffffff81516aa0>] driver_register+0x60/0xe0
> [<ffffffff8142297c>] __pci_register_driver+0x4c/0x50
> [<ffffffffa013605b>] 0xffffffffa013605b
>
Fixes: b18b6bde300e ("drm/i915/bdw: Free PPGTT struct")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-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] 3+ messages in thread
* Re: [PATCH] drm/i915: fix aliasing_ppgtt leak
2016-08-05 18:18 ` Chris Wilson
@ 2016-08-05 20:40 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-08-05 20:40 UTC (permalink / raw)
To: Chris Wilson, Matthew Auld, intel-gfx
On Fri, Aug 05, 2016 at 07:18:13PM +0100, Chris Wilson wrote:
> On Fri, Aug 05, 2016 at 07:04:40PM +0100, Matthew Auld wrote:
> > In i915_ggtt_cleanup_hw we need to remember to free aliasing_ppgtt. This
> > fixes the following kmemleak message:
> >
> > unreferenced object 0xffff880213cca000 (size 8192):
> > comm "modprobe", pid 1298, jiffies 4294745402 (age 703.930s)
> > hex dump (first 32 bytes):
> > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > backtrace:
> > [<ffffffff817c808e>] kmemleak_alloc+0x4e/0xb0
> > [<ffffffff8121f9c2>] kmem_cache_alloc_trace+0x142/0x1d0
> > [<ffffffffa06d11ef>] i915_gem_init_ggtt+0x10f/0x210 [i915]
> > [<ffffffffa06d71bb>] i915_gem_init+0x5b/0xd0 [i915]
> > [<ffffffffa069749a>] i915_driver_load+0x97a/0x1460 [i915]
> > [<ffffffffa06a26ef>] i915_pci_probe+0x4f/0x70 [i915]
> > [<ffffffff81423015>] local_pci_probe+0x45/0xa0
> > [<ffffffff81424463>] pci_device_probe+0x103/0x150
> > [<ffffffff81515e6c>] driver_probe_device+0x22c/0x440
> > [<ffffffff81516151>] __driver_attach+0xd1/0xf0
> > [<ffffffff8151379c>] bus_for_each_dev+0x6c/0xc0
> > [<ffffffff8151555e>] driver_attach+0x1e/0x20
> > [<ffffffff81514fa3>] bus_add_driver+0x1c3/0x280
> > [<ffffffff81516aa0>] driver_register+0x60/0xe0
> > [<ffffffff8142297c>] __pci_register_driver+0x4c/0x50
> > [<ffffffffa013605b>] 0xffffffffa013605b
> >
>
> Fixes: b18b6bde300e ("drm/i915/bdw: Free PPGTT struct")
Also added cc: stable per dim fixes. Bit overkill, but meh.
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
--
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] 3+ messages in thread
end of thread, other threads:[~2016-08-05 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 18:04 [PATCH] drm/i915: fix aliasing_ppgtt leak Matthew Auld
2016-08-05 18:18 ` Chris Wilson
2016-08-05 20:40 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox