Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483Ab2BTIIe (ORCPT ); Mon, 20 Feb 2012 03:08:34 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:48010 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184Ab2BTIId (ORCPT ); Mon, 20 Feb 2012 03:08:33 -0500 Message-ID: <4F41FF4E.7040000@gmail.com> Date: Mon, 20 Feb 2012 09:07:42 +0100 From: Thomas Weber User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20120213 Thunderbird/10.0.1 MIME-Version: 1.0 To: Grant Likely CC: Ming Lei , balbi@ti.com, Linus Walleij , Linux OMAP Mailing List , Linux Kernel Mailing List , Linux ARM Kernel Mailing List , NeilBrown Subject: Re: Possible circular locking dependency (3.3-rc2) References: <20120208124147.GF16334@legolas.emea.dhcp.ti.com> <20120215200910.GE25779@ponder.secretlab.ca> In-Reply-To: <20120215200910.GE25779@ponder.secretlab.ca> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5785 Lines: 96 Hello, I applied the patch from Ming, but got also an error. I am ccing Neil, because I also applied some patches from him. Regards, Thomas > [ 6.229370] ====================================================== > [ 6.235870] [ INFO: possible circular locking dependency detected ] > [ 6.242431] 3.3.0-rc4-00020-ga02b31a #10 Not tainted > [ 6.247650] ------------------------------------------------------- > [ 6.254241] udevadm/596 is trying to acquire lock: > [ 6.259277] (&dev->mutex#2){+.+.+.}, at: [] w1_bq27000_read+0x1c/0x48 > [ 6.267120] > [ 6.267120] but task is already holding lock: > [ 6.273254] (s_active#11){++++.+}, at: [] sysfs_write_file+0xdc/0x180 > [ 6.281097] > [ 6.281127] which lock already depends on the new lock. > [ 6.281127] > [ 6.289703] > [ 6.289703] the existing dependency chain (in reverse order) is: > [ 6.297576] > [ 6.297576] -> #1 (s_active#11){++++.+}: > [ 6.303283] [] lock_acquire+0xa0/0x128 > [ 6.308807] [] sysfs_addrm_finish+0xf4/0x148 > [ 6.314880] [] sysfs_hash_and_remove+0x4c/0x88 > [ 6.321136] [] sysfs_remove_file+0x30/0x38 > [ 6.326995] [] device_del+0xf0/0x17c > [ 6.332336] [] device_unregister+0xc/0x18 > [ 6.338104] [] w1_slave_detach+0xac/0xcc > [ 6.343811] [] w1_reconnect_slaves+0xc0/0x10c > [ 6.349945] [] w1_register_family+0x90/0xa0 > [ 6.355926] [] do_one_initcall+0x34/0x174 > [ 6.361694] [] kernel_init+0x94/0x11c > [ 6.367126] [] kernel_thread_exit+0x0/0x8 > [ 6.372924] > [ 6.372924] -> #0 (&dev->mutex#2){+.+.+.}: > [ 6.378845] [] __lock_acquire+0x1678/0x1ad4 > [ 6.384826] [] lock_acquire+0xa0/0x128 > [ 6.390319] [] mutex_lock_nested+0x48/0x2bc > [ 6.396301] [] w1_bq27000_read+0x1c/0x48 > [ 6.401977] [] bq27000_read_platform+0x2c/0x124 > [ 6.408325] [] bq27x00_battery_get_property+0x1cc/0x3cc > [ 6.415374] [] power_supply_show_property+0x4c/0x224 > [ 6.422180] [] power_supply_uevent+0xe4/0x224 > [ 6.428314] [] dev_uevent+0xb4/0x170 > [ 6.433654] [] kobject_uevent_env+0x1d8/0x478 > [ 6.439819] [] store_uevent+0x50/0x54 > [ 6.445220] [] dev_attr_store+0x18/0x24 > [ 6.450805] [] sysfs_write_file+0x100/0x180 > [ 6.456787] [] vfs_write+0xa8/0x138 > [ 6.462036] [] sys_write+0x40/0x6c > [ 6.467163] [] ret_fast_syscall+0x0/0x3c > [ 6.472869] > [ 6.472869] other info that might help us debug this: > [ 6.472900] > [ 6.481292] Possible unsafe locking scenario: > [ 6.481292] > [ 6.487518] CPU0 CPU1 > [ 6.492248] ---- ---- > [ 6.497009] lock(s_active#11); > [ 6.500427] lock(&dev->mutex#2); > [ 6.506683] lock(s_active#11); > [ 6.512756] lock(&dev->mutex#2); > [ 6.516357] > [ 6.516357] *** DEADLOCK *** > [ 6.516357] > [ 6.522583] 2 locks held by udevadm/596: > [ 6.526702] #0: (&buffer->mutex){+.+.+.}, at: [] sysfs_write_file+0x28/0x180 > [ 6.535278] #1: (s_active#11){++++.+}, at: [] sysfs_write_file+0xdc/0x180 > [ 6.543579] > [ 6.543579] > [ 6.543579] stack backtrace: > [ 6.548217] [] (unwind_backtrace+0x0/0xf8) from [] (print_circular_bug+0x2c8/0x2d4) > [ 6.558105] [] (print_circular_bug+0x2c8/0x2d4) from [] (__lock_acquire+0x1678/0x1ad4) > [ 6.568267] [] (__lock_acquire+0x1678/0x1ad4) from [] (lock_acquire+0xa0/0x128) > [ 6.577789] [] (lock_acquire+0xa0/0x128) from [] (mutex_lock_nested+0x48/0x2bc) > [ 6.587310] [] (mutex_lock_nested+0x48/0x2bc) from [] (w1_bq27000_read+0x1c/0x48) > [ 6.597015] [] (w1_bq27000_read+0x1c/0x48) from [] (bq27000_read_platform+0x2c/0x124) > [ 6.607086] [] (bq27000_read_platform+0x2c/0x124) from [] (bq27x00_battery_get_property+0x1cc/0x3cc) > [ 6.618499] [] (bq27x00_battery_get_property+0x1cc/0x3cc) from [] (power_supply_show_property+0x4c/0x224) > [ 6.630401] [] (power_supply_show_property+0x4c/0x224) from [] (power_supply_uevent+0xe4/0x224) > [ 6.641357] [] (power_supply_uevent+0xe4/0x224) from [] (dev_uevent+0xb4/0x170) > [ 6.650909] [] (dev_uevent+0xb4/0x170) from [] (kobject_uevent_env+0x1d8/0x478) > [ 6.660430] [] (kobject_uevent_env+0x1d8/0x478) from [] (store_uevent+0x50/0x54) > [ 6.670013] [] (store_uevent+0x50/0x54) from [] (dev_attr_store+0x18/0x24) > [ 6.679107] [] (dev_attr_store+0x18/0x24) from [] (sysfs_write_file+0x100/0x180) > [ 6.688720] [] (sysfs_write_file+0x100/0x180) from [] (vfs_write+0xa8/0x138) > [ 6.697967] [] (vfs_write+0xa8/0x138) from [] (sys_write+0x40/0x6c) > [ 6.706390] [] (sys_write+0x40/0x6c) from [] (ret_fast_syscall+0x0/0x3c) -- 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/