<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [BAT ILK] dma mapping leak on unloading intel-agp.ko"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93793">93793</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[BAT ILK] dma mapping leak on unloading intel-agp.ko
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>XOrg git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/Intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>daniel@ffwll.ch
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Detailed results at
<a href="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">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</a>

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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>