Bug 60754

Summary: circular locking dependency in cirrusfb
Product: Drivers Reporter: Jan-Simon Möller (dl9pf)
Component: Console/FramebuffersAssignee: James Simmons (jsimmons)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.11.0-rc4 Subsystem:
Regression: No Bisected commit-id:

Description Jan-Simon Möller 2013-08-16 12:27:34 UTC
[  314.337861] kworker/u2:0 (6) used greatest stack depth: 3736 bytes left
[  601.067152] 
[  601.067190] ======================================================
[  601.067229] [ INFO: possible circular locking dependency detected ]
[  601.067420] 3.11.0-rc4-gb7bc9e7-dirty #1 Tainted: G        W   
[  601.067480] -------------------------------------------------------
[  601.067534] kworker/0:2/121 is trying to acquire lock:
[  601.068299]  (&fb_info->lock){+.+.+.}, at: [<ffffffff817599a8>] lock_fb_info+0x18/0x36
[  601.068299] 
[  601.068299] but task is already holding lock:
[  601.068299]  (console_lock){+.+.+.}, at: [<ffffffff818ba035>] console_callback+0xe/0x12d
[  601.068299] 
[  601.068299] which lock already depends on the new lock.
[  601.068299] 
[  601.068299] 
[  601.068299] the existing dependency chain (in reverse order) is:
[  601.068299] 
[  601.068299] -> #1 (console_lock){+.+.+.}:
[  601.068299]        [<ffffffff8107d939>] lock_acquire+0x8f/0xb8
[  601.068299]        [<ffffffff810712be>] console_lock+0x65/0x6b
[  601.068299]        [<ffffffff8175af0c>] register_framebuffer+0x234/0x26e
[  601.068299]        [<ffffffff8180f7cb>] cirrusfb_pci_register+0x4eb/0x6a8
[  601.068299]        [<ffffffff817479af>] pci_device_probe+0x82/0xd2
[  601.068299]        [<ffffffff81b4c4b4>] driver_probe_device+0xbc/0x31e
[  601.068299]        [<ffffffff81b4c866>] __driver_attach+0x5f/0x85
[  601.068299]        [<ffffffff81b4a925>] bus_for_each_dev+0x74/0x9b
[  601.068299]        [<ffffffff81b4c805>] driver_attach+0x1c/0x1e
[  601.068299]        [<ffffffff81b4b0c6>] bus_add_driver+0xf1/0x27f
[  601.068299]        [<ffffffff81b4d16e>] driver_register+0x8d/0x110
[  601.068299]        [<ffffffff81747718>] __pci_register_driver+0x5c/0x63
[  601.068299]        [<ffffffff85954698>] cirrusfb_init+0xd2/0xdb
[  601.068299]        [<ffffffff81000228>] do_one_initcall+0x80/0x160
[  601.068299]        [<ffffffff8592200a>] kernel_init_freeable+0x179/0x211
[  601.068299]        [<ffffffff8380fdf5>] kernel_init+0x9/0x16e
[  601.068299]        [<ffffffff8381d2aa>] ret_from_fork+0x7a/0xb0
[  601.068299] 
[  601.068299] -> #0 (&fb_info->lock){+.+.+.}:
[  601.068299]        [<ffffffff8107efa3>] __lock_acquire+0x1641/0x17a9
[  601.068299]        [<ffffffff8107d939>] lock_acquire+0x8f/0xb8
[  601.068299]        [<ffffffff83812de2>] mutex_lock_nested+0x68/0x343
[  601.068299]        [<ffffffff817599a8>] lock_fb_info+0x18/0x36
[  601.068299]        [<ffffffff81764f4e>] fbcon_blank+0x197/0x247
[  601.068299]        [<ffffffff818b5dcf>] do_blank_screen+0x1b3/0x23e
[  601.068299]        [<ffffffff818ba10a>] console_callback+0xe3/0x12d
[  601.068299]        [<ffffffff8104e8d7>] process_one_work+0x1b3/0x44d
[  601.068299]        [<ffffffff8104e393>] worker_thread+0x21d/0x322
[  601.068299]        [<ffffffff81053e38>] kthread+0xd1/0xd9
[  601.068299]        [<ffffffff8381d2aa>] ret_from_fork+0x7a/0xb0
[  601.068299] 
[  601.068299] other info that might help us debug this:
[  601.068299] 
[  601.068299]  Possible unsafe locking scenario:
[  601.068299] 
[  601.068299]        CPU0                    CPU1
[  601.068299]        ----                    ----
[  601.068299]   lock(console_lock);
[  601.068299]                                lock(&fb_info->lock);
[  601.068299]                                lock(console_lock);
[  601.068299]   lock(&fb_info->lock);
[  601.068299] 
[  601.068299]  *** DEADLOCK ***
[  601.068299] 
[  601.068299] 3 locks held by kworker/0:2/121:
[  601.068299]  #0:  (events){.+.+.+}, at: [<ffffffff8104e885>] process_one_work+0x161/0x44d
[  601.068299]  #1:  (console_work){+.+...}, at: [<ffffffff8104e8af>] process_one_work+0x18b/0x44d
[  601.068299]  #2:  (console_lock){+.+.+.}, at: [<ffffffff818ba035>] console_callback+0xe/0x12d
[  601.068299]