<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 - [CI] igt@gem_userptr_blits@dmabuf-unsync - dmesg-warn - WARNING: possible circular locking dependency detecte"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103830">103830</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[CI] igt@gem_userptr_blits@dmabuf-unsync - dmesg-warn - WARNING: possible circular locking dependency detecte
</td>
</tr>
<tr>
<th>Product</th>
<td>DRI
</td>
</tr>
<tr>
<th>Version</th>
<td>DRI 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>marta.lofstedt@intel.com
</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><a href="https://intel-gfx-ci.01.org/tree/drm-tip/IGT_3993/shard-hsw5/igt@gem_userptr_blits@dmabuf-unsync.html">https://intel-gfx-ci.01.org/tree/drm-tip/IGT_3993/shard-hsw5/igt@gem_userptr_blits@dmabuf-unsync.html</a>
[ 5718.368156] ======================================================
[ 5718.368159] WARNING: possible circular locking dependency detected
[ 5718.368163] 4.14.0-CI-CI_DRM_3364+ #1 Tainted: G U W
[ 5718.368166] ------------------------------------------------------
[ 5718.368169] gem_userptr_bli/26317 is trying to acquire lock:
[ 5718.368172] (&mm->mmap_sem){++++}, at: [<ffffffffa0203cbf>]
i915_gem_userptr_init__mmu_notifier+0x1af/0x360 [i915]
[ 5718.368227]
but task is already holding lock:
[ 5718.368230] (&dev->object_name_lock){+.+.}, at: [<ffffffff815d91e2>]
drm_gem_prime_handle_to_fd+0xe2/0x1b0
[ 5718.368238]
which lock already depends on the new lock.
[ 5718.368242]
the existing dependency chain (in reverse order) is:
[ 5718.368246]
-> #2 (&dev->object_name_lock){+.+.}:
[ 5718.368253] __mutex_lock+0x86/0x9b0
[ 5718.368256] drm_gem_handle_create+0x24/0x40
[ 5718.368281] igt_ctx_exec+0x611/0xe30 [i915]
[ 5718.368313] __i915_subtests+0x34/0xc0 [i915]
[ 5718.368343] __run_selftests+0x11c/0x1c0 [i915]
[ 5718.368374] i915_live_selftests+0x31/0x60 [i915]
[ 5718.368396] i915_pci_probe+0x45/0x90 [i915]
[ 5718.368400] pci_device_probe+0xa1/0x130
[ 5718.368404] driver_probe_device+0x293/0x440
[ 5718.368408] __driver_attach+0xde/0xe0
[ 5718.368411] bus_for_each_dev+0x5c/0x90
[ 5718.368414] bus_add_driver+0x16d/0x260
[ 5718.368418] driver_register+0x57/0xc0
[ 5718.368421] do_one_initcall+0x3e/0x160
[ 5718.368425] do_init_module+0x5b/0x1fa
[ 5718.368429] load_module+0x2374/0x2dc0
[ 5718.368432] SyS_finit_module+0xaa/0xe0
[ 5718.368436] entry_SYSCALL_64_fastpath+0x1c/0xb1
[ 5718.368439]
-> #1 (&dev->struct_mutex){+.+.}:
[ 5718.368445] __mutex_lock+0x86/0x9b0
[ 5718.368471] i915_gem_set_caching_ioctl+0xdc/0x290 [i915]
[ 5718.368499] i915_gem_object_get_sg+0x396/0x3c0 [i915]
[ 5718.368503] __do_fault+0x1a/0x70
[ 5718.368506] __handle_mm_fault+0x7c4/0xdb0
[ 5718.368509] handle_mm_fault+0x154/0x300
[ 5718.368512] __do_page_fault+0x2d6/0x570
[ 5718.368515] page_fault+0x22/0x30
[ 5718.368518]
-> #0 (&mm->mmap_sem){++++}:
[ 5718.368525] lock_acquire+0xaf/0x200
[ 5718.368528] down_write+0x38/0x70
[ 5718.368557] i915_gem_userptr_init__mmu_notifier+0x1af/0x360 [i915]
[ 5718.368582] i915_gem_prime_export+0x6e/0x90 [i915]
[ 5718.368586] drm_gem_prime_handle_to_fd+0x186/0x1b0
[ 5718.368589] drm_ioctl_kernel+0x65/0xb0
[ 5718.368592] drm_ioctl+0x295/0x340
[ 5718.368595] do_vfs_ioctl+0x8f/0x670
[ 5718.368599] SyS_ioctl+0x3b/0x70
[ 5718.368602] entry_SYSCALL_64_fastpath+0x1c/0xb1
[ 5718.368604]
other info that might help us debug this:
[ 5718.368609] Chain exists of:
&mm->mmap_sem --> &dev->struct_mutex -->
&dev->object_name_lock
[ 5718.368616] Possible unsafe locking scenario:
[ 5718.368620] CPU0 CPU1
[ 5718.368622] ---- ----
[ 5718.368624] lock(&dev->object_name_lock);
[ 5718.368627] lock(&dev->struct_mutex);
[ 5718.368631] lock(&dev->object_name_lock);
[ 5718.368635] lock(&mm->mmap_sem);
[ 5718.368637]
*** DEADLOCK ***
[ 5718.368642] 2 locks held by gem_userptr_bli/26317:
[ 5718.368644] #0: (&prime_fpriv->lock){+.+.}, at: [<ffffffff815d9135>]
drm_gem_prime_handle_to_fd+0x35/0x1b0
[ 5718.368651] #1: (&dev->object_name_lock){+.+.}, at: [<ffffffff815d91e2>]
drm_gem_prime_handle_to_fd+0xe2/0x1b0
[ 5718.368658]
stack backtrace:
[ 5718.368662] CPU: 7 PID: 26317 Comm: gem_userptr_bli Tainted: G U W
4.14.0-CI-CI_DRM_3364+ #1
[ 5718.368666] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12
02/15/2016
[ 5718.368669] Call Trace:
[ 5718.368674] dump_stack+0x5f/0x86
[ 5718.368678] print_circular_bug.isra.18+0x1d0/0x2c0
[ 5718.368682] __lock_acquire+0x19c3/0x1b60
[ 5718.368687] ? lock_acquire+0xaf/0x200
[ 5718.368690] lock_acquire+0xaf/0x200
[ 5718.368720] ? i915_gem_userptr_init__mmu_notifier+0x1af/0x360 [i915]
[ 5718.368724] down_write+0x38/0x70
[ 5718.368753] ? i915_gem_userptr_init__mmu_notifier+0x1af/0x360 [i915]
[ 5718.368782] i915_gem_userptr_init__mmu_notifier+0x1af/0x360 [i915]
[ 5718.368808] i915_gem_prime_export+0x6e/0x90 [i915]
[ 5718.368812] drm_gem_prime_handle_to_fd+0x186/0x1b0
[ 5718.368816] ? drm_prime_remove_buf_handle_locked+0x90/0x90
[ 5718.368820] drm_ioctl_kernel+0x65/0xb0
[ 5718.368823] drm_ioctl+0x295/0x340
[ 5718.368826] ? drm_prime_remove_buf_handle_locked+0x90/0x90
[ 5718.368830] ? __handle_mm_fault+0x83a/0xdb0
[ 5718.368835] do_vfs_ioctl+0x8f/0x670
[ 5718.368838] ? entry_SYSCALL_64_fastpath+0x5/0xb1
[ 5718.368842] ? trace_hardirqs_on_caller+0xde/0x1c0
[ 5718.368846] SyS_ioctl+0x3b/0x70
[ 5718.368849] entry_SYSCALL_64_fastpath+0x1c/0xb1
[ 5718.368853] RIP: 0033:0x7f29b6cfb587
[ 5718.368855] RSP: 002b:00007ffeda5a69b8 EFLAGS: 00000246 ORIG_RAX:
0000000000000010
[ 5718.368860] RAX: ffffffffffffffda RBX: ffffc900008bfff0 RCX:
00007f29b6cfb587
[ 5718.368863] RDX: 00007ffeda5a69f4 RSI: 00000000c00c642d RDI:
0000000000000005
[ 5718.368866] RBP: 0000000000000001 R08: 0000000000001000 R09:
0000000000004010
[ 5718.368870] R10: 00007f29b6fbeb58 R11: 0000000000000246 R12:
0000000000000046
[ 5718.368873] R13: 00007ffeda5a7260 R14: 0000000000000000 R15:
0000000000000000</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>