.29rc2 lockdep report. fb_mmap vs sys_mmap2

From: Dave Jones
Date: Sat Jan 17 2009 - 18:19:39 EST


Two mmaps enter! Fight!


=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.29-0.41.rc2.fc11.i686 #1
-------------------------------------------------------
plymouthd/669 is trying to acquire lock:
(&fb_info->lock){--..}, at: [<c055355c>] fb_mmap+0x87/0x156

but task is already holding lock:
(&mm->mmap_sem){----}, at: [<c0406a5d>] sys_mmap2+0x44/0x7b

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&mm->mmap_sem){----}:
[<c044fef3>] __lock_acquire+0x9af/0xb22
[<c04500c1>] lock_acquire+0x5b/0x81
[<c048e036>] might_fault+0x60/0x80
[<c053dedc>] copy_to_user+0x2c/0xfc
[<c05542cc>] fb_ioctl+0x247/0x338
[<c04b0c9f>] vfs_ioctl+0x22/0x69
[<c04b1214>] do_vfs_ioctl+0x46a/0x4a3
[<c04b128d>] sys_ioctl+0x40/0x5a
[<c0403b76>] syscall_call+0x7/0xb
[<ffffffff>] 0xffffffff

-> #0 (&fb_info->lock){--..}:
[<c044fdc8>] __lock_acquire+0x884/0xb22
[<c04500c1>] lock_acquire+0x5b/0x81
[<c06e1b98>] __mutex_lock_common+0xd5/0x329
[<c06e1e84>] mutex_lock_nested+0x2e/0x36
[<c055355c>] fb_mmap+0x87/0x156
[<c0494620>] mmap_region+0x22b/0x43c
[<c0494aa2>] do_mmap_pgoff+0x271/0x2d1
[<c0406a73>] sys_mmap2+0x5a/0x7b
[<c0403b76>] syscall_call+0x7/0xb
[<ffffffff>] 0xffffffff

other info that might help us debug this:

1 lock held by plymouthd/669:
#0: (&mm->mmap_sem){----}, at: [<c0406a5d>] sys_mmap2+0x44/0x7b

stack backtrace:
Pid: 669, comm: plymouthd Not tainted 2.6.29-0.41.rc2.fc11.i686 #1
Call Trace:
[<c06e09b6>] ? printk+0xf/0x11
[<c044f32d>] print_circular_bug_tail+0x5d/0x68
[<c044fdc8>] __lock_acquire+0x884/0xb22
[<c04500c1>] lock_acquire+0x5b/0x81
[<c055355c>] ? fb_mmap+0x87/0x156
[<c06e1b98>] __mutex_lock_common+0xd5/0x329
[<c055355c>] ? fb_mmap+0x87/0x156
[<c06e1e84>] mutex_lock_nested+0x2e/0x36
[<c055355c>] ? fb_mmap+0x87/0x156
[<c055355c>] fb_mmap+0x87/0x156
[<c0494620>] mmap_region+0x22b/0x43c
[<c0494aa2>] do_mmap_pgoff+0x271/0x2d1
[<c0406a73>] sys_mmap2+0x5a/0x7b
[<c0403b76>] syscall_call+0x7/0xb


--
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/