]>
Commit | Line | Data |
---|---|---|
5a5e98ca GKH |
1 | From 3871f42a57efcdc6a9da751a8cb6fa196c212289 Mon Sep 17 00:00:00 2001 |
2 | From: Matthew Auld <matthew.auld@intel.com> | |
3 | Date: Fri, 5 Aug 2016 19:04:40 +0100 | |
4 | Subject: drm/i915: fix aliasing_ppgtt leak | |
5 | ||
6 | From: Matthew Auld <matthew.auld@intel.com> | |
7 | ||
8 | commit 3871f42a57efcdc6a9da751a8cb6fa196c212289 upstream. | |
9 | ||
10 | In i915_ggtt_cleanup_hw we need to remember to free aliasing_ppgtt. This | |
11 | fixes the following kmemleak message: | |
12 | ||
13 | unreferenced object 0xffff880213cca000 (size 8192): | |
14 | comm "modprobe", pid 1298, jiffies 4294745402 (age 703.930s) | |
15 | hex dump (first 32 bytes): | |
16 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |
17 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | |
18 | backtrace: | |
19 | [<ffffffff817c808e>] kmemleak_alloc+0x4e/0xb0 | |
20 | [<ffffffff8121f9c2>] kmem_cache_alloc_trace+0x142/0x1d0 | |
21 | [<ffffffffa06d11ef>] i915_gem_init_ggtt+0x10f/0x210 [i915] | |
22 | [<ffffffffa06d71bb>] i915_gem_init+0x5b/0xd0 [i915] | |
23 | [<ffffffffa069749a>] i915_driver_load+0x97a/0x1460 [i915] | |
24 | [<ffffffffa06a26ef>] i915_pci_probe+0x4f/0x70 [i915] | |
25 | [<ffffffff81423015>] local_pci_probe+0x45/0xa0 | |
26 | [<ffffffff81424463>] pci_device_probe+0x103/0x150 | |
27 | [<ffffffff81515e6c>] driver_probe_device+0x22c/0x440 | |
28 | [<ffffffff81516151>] __driver_attach+0xd1/0xf0 | |
29 | [<ffffffff8151379c>] bus_for_each_dev+0x6c/0xc0 | |
30 | [<ffffffff8151555e>] driver_attach+0x1e/0x20 | |
31 | [<ffffffff81514fa3>] bus_add_driver+0x1c3/0x280 | |
32 | [<ffffffff81516aa0>] driver_register+0x60/0xe0 | |
33 | [<ffffffff8142297c>] __pci_register_driver+0x4c/0x50 | |
34 | [<ffffffffa013605b>] 0xffffffffa013605b | |
35 | ||
36 | Signed-off-by: Matthew Auld <matthew.auld@intel.com> | |
37 | Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> | |
38 | Fixes: b18b6bde300e ("drm/i915/bdw: Free PPGTT struct") | |
39 | Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> | |
40 | Link: http://patchwork.freedesktop.org/patch/msgid/1470420280-21417-1-git-send-email-matthew.auld@intel.com | |
41 | (cherry picked from commit cb7f27601c81a1e0454e9461e96f65b31fafbea0) | |
42 | Signed-off-by: Jani Nikula <jani.nikula@intel.com> | |
43 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
44 | ||
45 | --- | |
46 | drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + | |
47 | 1 file changed, 1 insertion(+) | |
48 | ||
49 | --- a/drivers/gpu/drm/i915/i915_gem_gtt.c | |
50 | +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c | |
51 | @@ -2826,6 +2826,7 @@ void i915_ggtt_cleanup_hw(struct drm_dev | |
52 | struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt; | |
53 | ||
54 | ppgtt->base.cleanup(&ppgtt->base); | |
55 | + kfree(ppgtt); | |
56 | } | |
57 | ||
58 | i915_gem_cleanup_stolen(dev); |