lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 08 Jan 2009 22:11:26 +0800
From:	Wang Chen <wangchen@...fujitsu.com>
To:	David Airlie <airlied@...ux.ie>
CC:	dri-devel@...ts.sourceforge.net, Eric Anholt <eric@...olt.net>,
	linux-kernel@...r.kernel.org
Subject: possible circular locking dependency on i915 dma

Current Linus's tree has the following lockdep information.
I've bisected it, but there are several unbisectable commits
between "good" and "bad".
And my machine is too slow to continue bisect.
But by this unfinished git-bisect, I've known the latest good
is "0191b625ca5a46206d2fb862bb08f36f2fcb3b31"
and the most early bad is "5f34fe1cfc1bdd8b4711bbe37421fba4ed0d1ed4"

dmesg is bellow and .config is attached.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.28-default #147
-------------------------------------------------------
X/4226 is trying to acquire lock:
 (&mm->mmap_sem){----}, at: [<c01659f3>] might_fault+0x32/0x6d

but task is already holding lock:
 (&dev->struct_mutex){--..}, at: [<eeb19e32>] i915_cmdbuffer+0xfb/0x441 [i915]

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&dev->struct_mutex){--..}:
       [<c0132af9>] add_lock_to_list+0x5e/0x8b
       [<c01358e8>] validate_chain+0x8ee/0xbfb
       [<eeb6adaf>] drm_vm_open+0x22/0x32 [drm]
       [<eeb6adaf>] drm_vm_open+0x22/0x32 [drm]
       [<c0136269>] __lock_acquire+0x674/0x700
       [<c013634d>] lock_acquire+0x58/0x71
       [<eeb6adaf>] drm_vm_open+0x22/0x32 [drm]
       [<c02d6d4b>] mutex_lock_nested+0xdb/0x247
       [<eeb6adaf>] drm_vm_open+0x22/0x32 [drm]
       [<eeb6adaf>] drm_vm_open+0x22/0x32 [drm]
       [<c01199cb>] dup_mm+0x247/0x2ec
       [<c011a3ce>] copy_process+0x93b/0xf42
       [<c011ab20>] do_fork+0x115/0x29b
       [<c01659f3>] might_fault+0x32/0x6d
       [<c01e78c1>] copy_to_user+0x25/0x3c
       [<c0102c0b>] sysenter_exit+0xf/0x16
       [<c01016a7>] sys_clone+0x28/0x2d
       [<c0102bdd>] sysenter_do_call+0x12/0x31
       [<ffffffff>] 0xffffffff

-> #1 (&mm->mmap_sem/1){--..}:
       [<c0132af9>] add_lock_to_list+0x5e/0x8b
       [<c01358e8>] validate_chain+0x8ee/0xbfb
       [<c0119825>] dup_mm+0xa1/0x2ec
       [<c0119825>] dup_mm+0xa1/0x2ec
       [<c0136269>] __lock_acquire+0x674/0x700
       [<c013634d>] lock_acquire+0x58/0x71
       [<c0119825>] dup_mm+0xa1/0x2ec
       [<c012cbb8>] down_write_nested+0x30/0x49
       [<c0119825>] dup_mm+0xa1/0x2ec
       [<c0119825>] dup_mm+0xa1/0x2ec
       [<c0134a55>] trace_hardirqs_on_caller+0x10b/0x131
       [<c011a3ce>] copy_process+0x93b/0xf42
       [<c011ab20>] do_fork+0x115/0x29b
       [<c01659f3>] might_fault+0x32/0x6d
       [<c01e78c1>] copy_to_user+0x25/0x3c
       [<c0102c0b>] sysenter_exit+0xf/0x16
       [<c01016a7>] sys_clone+0x28/0x2d
       [<c0102bdd>] sysenter_do_call+0x12/0x31
       [<ffffffff>] 0xffffffff

-> #0 (&mm->mmap_sem){----}:
       [<c01355db>] validate_chain+0x5e1/0xbfb
       [<c0136269>] __lock_acquire+0x674/0x700
       [<c013634d>] lock_acquire+0x58/0x71
       [<c01659f3>] might_fault+0x32/0x6d
       [<c0165a10>] might_fault+0x4f/0x6d
       [<c01659f3>] might_fault+0x32/0x6d
       [<eeb19b51>] i915_emit_box+0x18/0x1fe [i915]
       [<eeb19eb0>] i915_cmdbuffer+0x179/0x441 [i915]
       [<eeb66712>] drm_ioctl+0x19f/0x211 [drm]
       [<eeb19d37>] i915_cmdbuffer+0x0/0x441 [i915]
       [<eeb66573>] drm_ioctl+0x0/0x211 [drm]
       [<c017f27e>] vfs_ioctl+0x3a/0x49
       [<c017f727>] do_vfs_ioctl+0x3b6/0x409
       [<c02d7f51>] _spin_unlock+0x14/0x1c
       [<c0164f3e>] handle_mm_fault+0x55e/0x571
       [<c012cc3a>] down_read_trylock+0x36/0x3d
       [<c017f7bb>] sys_ioctl+0x41/0x58
       [<c0102bdd>] sysenter_do_call+0x12/0x31
       [<ffffffff>] 0xffffffff

other info that might help us debug this:

1 lock held by X/4226:
 #0:  (&dev->struct_mutex){--..}, at: [<eeb19e32>] i915_cmdbuffer+0xfb/0x441 [i915]

stack backtrace:
Pid: 4226, comm: X Not tainted 2.6.28-default #147
Call Trace:
 [<c0134ff0>] print_circular_bug_tail+0xa6/0xb0
 [<c01355db>] validate_chain+0x5e1/0xbfb
 [<c0136269>] __lock_acquire+0x674/0x700
 [<c013634d>] lock_acquire+0x58/0x71
 [<c01659f3>] might_fault+0x32/0x6d
 [<c0165a10>] might_fault+0x4f/0x6d
 [<c01659f3>] might_fault+0x32/0x6d
 [<eeb19b51>] i915_emit_box+0x18/0x1fe [i915]
 [<eeb19eb0>] i915_cmdbuffer+0x179/0x441 [i915]
 [<eeb66712>] drm_ioctl+0x19f/0x211 [drm]
 [<eeb19d37>] i915_cmdbuffer+0x0/0x441 [i915]
 [<eeb66573>] drm_ioctl+0x0/0x211 [drm]
 [<c017f27e>] vfs_ioctl+0x3a/0x49
 [<c017f727>] do_vfs_ioctl+0x3b6/0x409
 [<c02d7f51>] _spin_unlock+0x14/0x1c
 [<c0164f3e>] handle_mm_fault+0x55e/0x571
 [<c012cc3a>] down_read_trylock+0x36/0x3d
 [<c017f7bb>] sys_ioctl+0x41/0x58
 [<c0102bdd>] sysenter_do_call+0x12/0x31

View attachment ".config" of type "text/plain" (80057 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ