From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: [next-20160726] possible circular locking dependency detected Date: Wed, 27 Jul 2016 22:30:02 +0900 Message-ID: <20160727133002.GA560@swordfish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pa0-f66.google.com ([209.85.220.66]:34287 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756010AbcG0Nae (ORCPT ); Wed, 27 Jul 2016 09:30:34 -0400 Content-Disposition: inline Sender: linux-next-owner@vger.kernel.org List-ID: To: David Airlie Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Stephen Rothwell , linux-next@vger.kernel.org Hello, [ 2.375503] ====================================================== [ 2.375504] [ INFO: possible circular locking dependency detected ] [ 2.375505] 4.7.0-next-20160727-dbg-00004-g32e4851-dirty #770 Not tainted [ 2.375506] ------------------------------------------------------- [ 2.375507] kworker/u16:3/119 is trying to acquire lock: [ 2.375526] (&dev->mode_config.mutex){+.+.+.}, at: [] drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.375527] but task is already holding lock: [ 2.375532] ((fb_notifier_list).rwsem){++++.+}, at: [] __blocking_notifier_call_chain+0x31/0x64 [ 2.375533] which lock already depends on the new lock. [ 2.375533] the existing dependency chain (in reverse order) is: [ 2.375535] -> #1 ((fb_notifier_list).rwsem){++++.+}: [ 2.375539] [] lock_acquire+0x130/0x1c4 [ 2.375541] [] down_write+0x3b/0x6a [ 2.375543] [] blocking_notifier_chain_register+0x33/0x53 [ 2.375546] [] fb_register_client+0x18/0x1a [ 2.375549] [] backlight_device_register+0x145/0x1c5 [ 2.375593] [] intel_backlight_device_register+0xdc/0x137 [i915] [ 2.375634] [] intel_connector_register+0xe/0x10 [i915] [ 2.375675] [] intel_dp_connector_register+0x1b/0x70 [i915] [ 2.375689] [] drm_connector_register+0x5c/0x80 [drm] [ 2.375702] [] drm_modeset_register_all+0x156/0x19e [drm] [ 2.375713] [] drm_dev_register+0x7c/0xc7 [drm] [ 2.375747] [] i915_driver_load+0xf3e/0x1040 [i915] [ 2.375782] [] i915_pci_probe+0x3f/0x41 [i915] [ 2.375785] [] pci_device_probe+0x83/0xeb [ 2.375789] [] driver_probe_device+0x118/0x261 [ 2.375790] [] __driver_attach+0x73/0x95 [ 2.375792] [] bus_for_each_dev+0x6f/0x87 [ 2.375794] [] driver_attach+0x1e/0x20 [ 2.375796] [] bus_add_driver+0xf6/0x1e6 [ 2.375797] [] driver_register+0x88/0xbf [ 2.375800] [] __pci_register_driver+0x5d/0x60 [ 2.375830] [] i915_init+0x62/0x66 [i915] [ 2.375833] [] do_one_initcall+0x90/0x118 [ 2.375835] [] do_init_module+0x5f/0x1f1 [ 2.375839] [] load_module+0x1b00/0x2053 [ 2.375841] [] SyS_init_module+0xff/0x125 [ 2.375844] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 2.375846] -> #0 (&dev->mode_config.mutex){+.+.+.}: [ 2.375849] [] __lock_acquire+0xf09/0x15a1 [ 2.375851] [] lock_acquire+0x130/0x1c4 [ 2.375853] [] mutex_lock_nested+0x70/0x32d [ 2.375865] [] drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.375872] [] drm_fb_helper_restore_fbdev_mode_unlocked+0x2e/0x6d [drm_kms_helper] [ 2.375878] [] drm_fb_helper_set_par+0x3f/0x4b [drm_kms_helper] [ 2.375917] [] intel_fbdev_set_par+0x17/0x56 [i915] [ 2.375919] [] fbcon_init+0x35f/0x464 [ 2.375922] [] visual_init+0xd6/0x12a [ 2.375924] [] do_bind_con_driver+0x1a0/0x2a6 [ 2.375926] [] do_take_over_console+0x167/0x191 [ 2.375929] [] do_fbcon_takeover+0x60/0x9a [ 2.375931] [] fbcon_event_notify+0x434/0x763 [ 2.375934] [] notifier_call_chain+0x3e/0x62 [ 2.375936] [] __blocking_notifier_call_chain+0x4c/0x64 [ 2.375938] [] blocking_notifier_call_chain+0x14/0x16 [ 2.375940] [] fb_notifier_call_chain+0x1b/0x1d [ 2.375941] [] register_framebuffer+0x293/0x2cf [ 2.375948] [] drm_fb_helper_initial_config+0x2a7/0x32d [drm_kms_helper] [ 2.375986] [] intel_fbdev_initial_config+0x18/0x28 [i915] [ 2.375988] [] async_run_entry_fn+0x37/0xcd [ 2.375991] [] process_one_work+0x2b1/0x59e [ 2.375993] [] worker_thread+0x24f/0x38a [ 2.375995] [] kthread+0xf8/0x100 [ 2.375997] [] ret_from_fork+0x1f/0x40 [ 2.375998] other info that might help us debug this: [ 2.375998] Possible unsafe locking scenario: [ 2.375999] CPU0 CPU1 [ 2.375999] ---- ---- [ 2.376000] lock((fb_notifier_list).rwsem); [ 2.376002] lock(&dev->mode_config.mutex); [ 2.376003] lock((fb_notifier_list).rwsem); [ 2.376004] lock(&dev->mode_config.mutex); [ 2.376004] *** DEADLOCK *** [ 2.376005] 6 locks held by kworker/u16:3/119: [ 2.376009] #0: ("events_unbound"){.+.+.+}, at: [] process_one_work+0x196/0x59e [ 2.376012] #1: ((&entry->work)){+.+.+.}, at: [] process_one_work+0x196/0x59e [ 2.376015] #2: (registration_lock){+.+.+.}, at: [] register_framebuffer+0x27/0x2cf [ 2.376018] #3: (console_lock){+.+.+.}, at: [] register_framebuffer+0x271/0x2cf [ 2.376021] #4: (&fb_info->lock){+.+.+.}, at: [] lock_fb_info+0x1d/0x3c [ 2.376025] #5: ((fb_notifier_list).rwsem){++++.+}, at: [] __blocking_notifier_call_chain+0x31/0x64 [ 2.376025] stack backtrace: [ 2.376027] CPU: 2 PID: 119 Comm: kworker/u16:3 Not tainted 4.7.0-next-20160727-dbg-00004-g32e4851-dirty #770 [ 2.376030] Workqueue: events_unbound async_run_entry_fn [ 2.376033] 0000000000000000 ffff88041a9fb7f0 ffffffff811d980b ffffffff81f1f400 [ 2.376035] ffffffff81f226a0 ffff88041a9fb830 ffffffff81083b78 ffff88041a9ea980 [ 2.376037] ffff88041a9eb178 0000000000000006 ffff88041a9eb1a0 ffff88041a9ea980 [ 2.376038] Call Trace: [ 2.376041] [] dump_stack+0x68/0x92 [ 2.376044] [] print_circular_bug+0x286/0x294 [ 2.376046] [] __lock_acquire+0xf09/0x15a1 [ 2.376049] [] lock_acquire+0x130/0x1c4 [ 2.376051] [] ? lock_acquire+0x130/0x1c4 [ 2.376063] [] ? drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.376075] [] ? drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.376077] [] mutex_lock_nested+0x70/0x32d [ 2.376088] [] ? drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.376100] [] ? drm_modeset_lock_all+0x25/0xb7 [drm] [ 2.376102] [] ? rcu_read_lock_sched_held+0x61/0x69 [ 2.376114] [] drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.376125] [] ? drm_modeset_lock_all+0x4f/0xb7 [drm] [ 2.376131] [] drm_fb_helper_restore_fbdev_mode_unlocked+0x2e/0x6d [drm_kms_helper] [ 2.376138] [] drm_fb_helper_set_par+0x3f/0x4b [drm_kms_helper] [ 2.376175] [] intel_fbdev_set_par+0x17/0x56 [i915] [ 2.376178] [] fbcon_init+0x35f/0x464 [ 2.376180] [] visual_init+0xd6/0x12a [ 2.376182] [] do_bind_con_driver+0x1a0/0x2a6 [ 2.376184] [] do_take_over_console+0x167/0x191 [ 2.376186] [] do_fbcon_takeover+0x60/0x9a [ 2.376188] [] fbcon_event_notify+0x434/0x763 [ 2.376191] [] notifier_call_chain+0x3e/0x62 [ 2.376193] [] __blocking_notifier_call_chain+0x4c/0x64 [ 2.376196] [] blocking_notifier_call_chain+0x14/0x16 [ 2.376197] [] fb_notifier_call_chain+0x1b/0x1d [ 2.376199] [] register_framebuffer+0x293/0x2cf [ 2.376206] [] drm_fb_helper_initial_config+0x2a7/0x32d [drm_kms_helper] [ 2.376244] [] intel_fbdev_initial_config+0x18/0x28 [i915] [ 2.376246] [] async_run_entry_fn+0x37/0xcd [ 2.376248] [] process_one_work+0x2b1/0x59e [ 2.376251] [] worker_thread+0x24f/0x38a [ 2.376253] [] ? rescuer_thread+0x2cf/0x2cf [ 2.376255] [] kthread+0xf8/0x100 [ 2.376257] [] ? _raw_spin_unlock_irq+0x2c/0x4a [ 2.376260] [] ret_from_fork+0x1f/0x40 [ 2.376262] [] ? kthread_create_on_node+0x1d4/0x1d4 -ss