Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760205Ab3CICRu (ORCPT ); Fri, 8 Mar 2013 21:17:50 -0500 Received: from mail-oa0-f44.google.com ([209.85.219.44]:34850 "EHLO mail-oa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759947Ab3CICRt (ORCPT ); Fri, 8 Mar 2013 21:17:49 -0500 Message-ID: <513A9BCA.9020402@lwfinger.net> Date: Fri, 08 Mar 2013 20:17:46 -0600 From: Larry Finger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: LKML CC: Linus Torvalds , Andrew Morton , Russell King Subject: [3.9-rc1] Locking dependency problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6555 Lines: 123 In kernel 3.9-rc1, I get the following lockdep warning. This kernel is from the wireless-testing tree, but I have seen the same message from the mainline kernel. [ 4199.401157] [ 4199.401159] ====================================================== [ 4199.401160] [ INFO: possible circular locking dependency detected ] [ 4199.401163] 3.9.0-rc1-wl+ #124 Tainted: G W [ 4199.401164] ------------------------------------------------------- [ 4199.401167] kworker/0:3/2382 is trying to acquire lock: [ 4199.401177] (&fb_info->lock){+.+.+.}, at: [] lock_fb_info+0x21/0x60 [ 4199.401177] [ 4199.401177] but task is already holding lock: [ 4199.401183] (console_lock){+.+.+.}, at: [] console_callback+0xe/0x130 [ 4199.401184] [ 4199.401184] which lock already depends on the new lock. [ 4199.401184] [ 4199.401185] [ 4199.401185] the existing dependency chain (in reverse order) is: [ 4199.401187] [ 4199.401187] -> #1 (console_lock){+.+.+.}: [ 4199.401193] [] lock_acquire+0xa8/0x1f0 [ 4199.401197] [] console_lock+0x77/0x80 [ 4199.401200] [] register_framebuffer+0x1b2/0x300 [ 4199.401205] [] vesafb_probe+0x6ec/0x76c [ 4199.401208] [] platform_drv_probe+0x3e/0x70 [ 4199.401211] [] driver_probe_device+0x75/0x230 [ 4199.401213] [] __driver_attach+0xa3/0xb0 [ 4199.401216] [] bus_for_each_dev+0x55/0x90 [ 4199.401218] [] driver_attach+0x19/0x20 [ 4199.401220] [] bus_add_driver+0x109/0x270 [ 4199.401223] [] driver_register+0x72/0x170 [ 4199.401226] [] platform_driver_register+0x41/0x50 [ 4199.401228] [] platform_driver_probe+0x16/0xa0 [ 4199.401231] [] vesafb_init+0x215/0x258 [ 4199.401235] [] do_one_initcall+0x122/0x180 [ 4199.401239] [] kernel_init_freeable+0x103/0x192 [ 4199.401242] [] kernel_init+0x9/0xf0 [ 4199.401247] [] ret_from_fork+0x7c/0xb0 [ 4199.401250] [ 4199.401250] -> #0 (&fb_info->lock){+.+.+.}: [ 4199.401252] [] __lock_acquire+0x1479/0x1c70 [ 4199.401255] [] lock_acquire+0xa8/0x1f0 [ 4199.401257] [] mutex_lock_nested+0x69/0x370 [ 4199.401259] [] lock_fb_info+0x21/0x60 [ 4199.401263] [] fbcon_blank+0x29b/0x2e0 [ 4199.401266] [] do_blank_screen+0x1d6/0x280 [ 4199.401269] [] console_callback+0x5f/0x130 [ 4199.401273] [] process_one_work+0x1f1/0x660 [ 4199.401275] [] worker_thread+0x110/0x380 [ 4199.401279] [] kthread+0xd6/0xe0 [ 4199.401282] [] ret_from_fork+0x7c/0xb0 [ 4199.401282] [ 4199.401282] other info that might help us debug this: [ 4199.401282] [ 4199.401283] Possible unsafe locking scenario: [ 4199.401283] [ 4199.401284] CPU0 CPU1 [ 4199.401284] ---- ---- [ 4199.401286] lock(console_lock); [ 4199.401287] lock(&fb_info->lock); [ 4199.401288] lock(console_lock); [ 4199.401290] lock(&fb_info->lock); [ 4199.401290] [ 4199.401290] *** DEADLOCK *** [ 4199.401290] [ 4199.401292] 3 locks held by kworker/0:3/2382: [ 4199.401297] #0: (events){.+.+.+}, at: [] process_one_work+0x185/0x660 [ 4199.401301] #1: (console_work){+.+...}, at: [] process_one_work+0x185/0x660 [ 4199.401305] #2: (console_lock){+.+.+.}, at: [] console_callback+0xe/0x130 [ 4199.401306] [ 4199.401306] stack backtrace: [ 4199.401308] Pid: 2382, comm: kworker/0:3 Tainted: G W 3.9.0-rc1-wl+ #124 [ 4199.401309] Call Trace: [ 4199.401312] [] print_circular_bug+0x28e/0x29f [ 4199.401315] [] ? retint_restore_args+0x13/0x13 [ 4199.401318] [] __lock_acquire+0x1479/0x1c70 [ 4199.401322] [] ? bitfill_aligned+0x8b/0x140 [ 4199.401324] [] lock_acquire+0xa8/0x1f0 [ 4199.401326] [] ? lock_fb_info+0x21/0x60 [ 4199.401329] [] mutex_lock_nested+0x69/0x370 [ 4199.401331] [] ? lock_fb_info+0x21/0x60 [ 4199.401333] [] ? bit_clear+0xcc/0x100 [ 4199.401336] [] ? fbcon_clear+0x1be/0x1f0 [ 4199.401338] [] lock_fb_info+0x21/0x60 [ 4199.401341] [] fbcon_blank+0x29b/0x2e0 [ 4199.401343] [] ? _raw_spin_unlock_irqrestore+0x3a/0x80 [ 4199.401346] [] ? trace_hardirqs_on_caller+0x10d/0x1a0 [ 4199.401349] [] ? trace_hardirqs_on+0xd/0x10 [ 4199.401354] [] ? try_to_del_timer_sync+0x4a/0x60 [ 4199.401356] [] ? del_timer_sync+0xba/0xf0 [ 4199.401359] [] ? try_to_del_timer_sync+0x60/0x60 [ 4199.401362] [] do_blank_screen+0x1d6/0x280 [ 4199.401364] [] console_callback+0x5f/0x130 [ 4199.401367] [] process_one_work+0x1f1/0x660 [ 4199.401370] [] ? process_one_work+0x185/0x660 [ 4199.401372] [] worker_thread+0x110/0x380 [ 4199.401375] [] ? trace_hardirqs_on+0xd/0x10 [ 4199.401377] [] ? rescuer_thread+0x250/0x250 [ 4199.401379] [] kthread+0xd6/0xe0 [ 4199.401382] [] ? _raw_spin_unlock_irq+0x2b/0x50 [ 4199.401385] [] ? __init_kthread_worker+0x70/0x70 [ 4199.401388] [] ret_from_fork+0x7c/0xb0 [ 4199.401390] [] ? __init_kthread_worker+0x70/0x70 This problem seems to be related to http://www.mentby.com/russell-king-2/bug-circular-locking-dependency-detected.html. Losing lockdep when the screen blanks is certainly a hindrance when trying to debug new drivers. Thanks, Larry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/