Bug 93793 - [BAT ILK] dma mapping leak on unloading intel-agp.ko
Summary: [BAT ILK] dma mapping leak on unloading intel-agp.ko
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: highest normal
Assignee: cprigent
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-20 16:05 UTC by Daniel Vetter
Modified: 2016-03-10 11:22 UTC (History)
1 user (show)

See Also:
i915 platform: ILK
i915 features: GEM/Other


Attachments

Description Daniel Vetter 2016-01-20 16:05:42 UTC
Detailed results at http://benchsrv.fi.intel.com/archive/results/CI_IGT_test/CI_DRM_992/ilk-hp8440p/html/ilk-hp8440p@CI_DRM_992@1/igt@drv_module_reload_basic.html

Looks like we leak the gmch dma mapping or similar when unloading intel-agp.ko. Needs dma mapping debugging enabled.

[  256.997445] ------------[ cut here ]------------
[  256.997455] WARNING: CPU: 3 PID: 5808 at lib/dma-debug.c:974 dma_debug_device_change+0x179/0x1e0()
[  256.997457] pci 0000:00:02.0: DMA-API: device driver has pending DMA allocations while released from device [count=1]
One of leaked entries details: [device address=0x0000000000050000] [size=4096 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as page]
[  256.997459] Modules linked in: ax88179_178a usbnet mii intel_powerclamp i915(-) coretemp crct10dif_pclmul crc32_pclmul lpc_ich mei_me mei sdhci_pci sdhci mmc_core e1000e ptp pps_core
[  256.997475] CPU: 3 PID: 5808 Comm: rmmod Tainted: G     U          4.4.0-gfxbench+ #1
[  256.997476] Hardware name: Hewlett-Packard HP EliteBook 8440p/172A, BIOS 68CCU Ver. F.24 09/13/2013
[  256.997478]  ffffffff81a93aa0 ffff880131733c78 ffffffff813e00ac ffff880131733cc0
[  256.997481]  ffff880131733cb0 ffffffff810746f1 ffff8800b6eea6b8 0000000000000001
[  256.997483]  ffff8800b6440e38 ffffffff81a682cf ffff8800b6d191e0 ffff880131733d10
[  256.997486] Call Trace:
[  256.997490]  [<ffffffff813e00ac>] dump_stack+0x4e/0x82
[  256.997494]  [<ffffffff810746f1>] warn_slowpath_common+0x81/0xc0
[  256.997495]  [<ffffffff81074777>] warn_slowpath_fmt+0x47/0x50
[  256.997501]  [<ffffffff810c59e4>] ? trace_hardirqs_on_caller+0x124/0x1b0
[  256.997503]  [<ffffffff81412879>] dma_debug_device_change+0x179/0x1e0
[  256.997508]  [<ffffffff81096fc9>] notifier_call_chain+0x39/0xa0
[  256.997510]  [<ffffffff810973c8>] __blocking_notifier_call_chain+0x48/0x70
[  256.997512]  [<ffffffff81097401>] blocking_notifier_call_chain+0x11/0x20
[  256.997517]  [<ffffffff8151edd0>] __device_release_driver+0x100/0x130
[  256.997519]  [<ffffffff8151eef3>] driver_detach+0xb3/0xc0
[  256.997521]  [<ffffffff8151df23>] bus_remove_driver+0x53/0xd0
[  256.997524]  [<ffffffff8151f917>] driver_unregister+0x27/0x50
[  256.997526]  [<ffffffff814287a5>] pci_unregister_driver+0x25/0x70
[  256.997529]  [<ffffffff814fce94>] drm_pci_exit+0x74/0x90
[  256.997556]  [<ffffffffa01cc210>] i915_exit+0x20/0x19b [i915]
[  256.997560]  [<ffffffff810ffbbc>] SyS_delete_module+0x18c/0x1f0
[  256.997563]  [<ffffffff8179e75b>] entry_SYSCALL_64_fastpath+0x16/0x73
[  256.997564] ---[ end trace a8f932670a4ca3db ]---
[  256.997565] Mapped at:
[  256.997567]  [<ffffffff81413778>] debug_dma_map_page+0x88/0x150
[  256.997569]  [<ffffffff814ccce5>] intel_gmch_probe+0x4c5/0xa10
[  256.997571]  [<ffffffff814cb3c2>] agp_intel_probe+0x42/0x1a0
[  256.997576]  [<ffffffff81429847>] pci_device_probe+0x87/0xf0
[  256.997578]  [<ffffffff8151e911>] driver_probe_device+0x221/0x4a0
Comment 1 Daniel Vetter 2016-01-27 09:41:28 UTC
http://patchwork.freedesktop.org/series/2851/

fixes this. Needs a bit more polish + CI getting back up, then we're good here.
Comment 2 Kimmo Nikkanen 2016-02-01 18:50:24 UTC
Assigning to QA for verification
Comment 3 Daniel Vetter 2016-02-10 16:10:28 UTC
The patches haven't landed yet because lack of review :(
Comment 4 dog 2016-03-09 19:09:14 UTC
Who would be a good person to review this patch set?
Comment 5 Ville Syrjala 2016-03-09 19:17:13 UTC
The patches are all in AFAICS.

3e99a6b95614 ("drm/i915: Stop depending upon CONFIG_AGP_INTEL")
ebb7c78d358b ("agp/intel-gtt: Only register fake agp driver for gen1")
9f5ac8ed4013 ("agp/intel-gtt: Don't leak the scratch page")
Comment 6 dog 2016-03-09 19:37:58 UTC
Thanks for the update, Ville.
Comment 7 cprigent 2016-03-10 11:22:07 UTC
Test is Pass. No such error in log.

Desktop d3c4102
Ubuntu 14.04.4 LTS 
Libdrm: 2.4.64 
Kernel 4.5.0-rc7 drm-intel-nightly from git://anongit.freedesktop.org/drm-intel
IGT 1.14


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.