From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757443AbYERLlN (ORCPT ); Sun, 18 May 2008 07:41:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753302AbYERLk7 (ORCPT ); Sun, 18 May 2008 07:40:59 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:34708 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210AbYERLk5 (ORCPT ); Sun, 18 May 2008 07:40:57 -0400 Date: Sun, 18 May 2008 13:40:20 +0200 From: Ingo Molnar To: Cyrill Gorcunov Cc: linux-kernel@vger.kernel.org, Michael Halcrow , Eric Sandeen , Peter Zijlstra Subject: Re: [v2.6.26-rc1] possible circular locking in ecryptfs Message-ID: <20080518114020.GA14889@elte.hu> References: <20080507200228.GA17810@elte.hu> <20080509094422.GA19090@elte.hu> <20080510084759.GB6872@cvg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080510084759.GB6872@cvg> User-Agent: Mutt/1.5.17 (2007-11-01) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Cyrill Gorcunov wrote: > [Ingo Molnar - Fri, May 09, 2008 at 11:44:23AM +0200] > | > | * Ingo Molnar wrote: > | > | > x86.git testing found the following "possible circular locking" > | > lockdep warning, generated by the ecryptfs code: > | > | the correct URL for the config is: > | > | http://redhat.com/~mingo/misc/config-Wed_May__7_16_17_31_CEST_2008.bad > | > | this is reproducible, it happened a second time since i originally > | reported it. > | > | Ingo > > Hi Ingo, I've just sent patch, could you test it, please? > > http://lkml.org/lkml/2008/5/10/20 that patch is now upstream - but see below there's still a circular dependency. Ingo [ 21.530026] [ 21.530026] ======================================================= [ 21.530026] [ INFO: possible circular locking dependency detected ] [ 21.530026] 2.6.26-rc2-sched-devel.git #1205 [ 21.530026] ------------------------------------------------------- [ 21.530026] multipath.stati/1379 is trying to acquire lock: [ 21.530026] (&ecryptfs_daemon_hash_mux){--..}, at: [] ecryptfs_miscdev_open+0x22/0x140 [ 21.530026] [ 21.530026] but task is already holding lock: [ 21.530026] (misc_mtx){--..}, at: [] misc_open+0x22/0x120 [ 21.530026] [ 21.530026] which lock already depends on the new lock. [ 21.530026] [ 21.530026] [ 21.530026] the existing dependency chain (in reverse order) is: [ 21.530026] [ 21.530026] -> #1 (misc_mtx){--..}: [ 21.530026] [] __lock_acquire+0xc3a/0x1100 [ 21.530026] [] lock_acquire+0x76/0xa0 [ 21.530026] [] mutex_lock_nested+0x7a/0x280 [ 21.530026] [] misc_register+0x25/0x140 [ 21.530026] [] ecryptfs_init_ecryptfs_miscdev+0x2c/0x60 [ 21.530026] [] ecryptfs_init_messaging+0x1ee/0x280 [ 21.530026] [] ecryptfs_init+0xc2/0x1b0 [ 21.530026] [] kernel_init+0x132/0x250 [ 21.530026] [] kernel_thread_helper+0x7/0x10 [ 21.530026] [] 0xffffffff [ 21.530026] [ 21.530026] -> #0 (&ecryptfs_daemon_hash_mux){--..}: [ 21.530026] [] __lock_acquire+0xa5d/0x1100 [ 21.530026] [] lock_acquire+0x76/0xa0 [ 21.530026] [] mutex_lock_nested+0x7a/0x280 [ 21.530026] [] ecryptfs_miscdev_open+0x22/0x140 [ 21.530026] [] misc_open+0x82/0x120 [ 21.530026] [] chrdev_open+0x86/0x150 [ 21.530026] [] __dentry_open+0xa9/0x260 [ 21.530026] [] nameidata_to_filp+0x47/0x60 [ 21.530026] [] do_filp_open+0x184/0x7a0 [ 21.530026] [] do_sys_open+0x4a/0xb0 [ 21.530026] [] sys_open+0x2e/0x40 [ 21.530026] [] syscall_call+0x7/0xb [ 21.530026] [] 0xffffffff [ 21.530026] [ 21.530026] other info that might help us debug this: [ 21.530026] [ 21.530026] 1 lock held by multipath.stati/1379: [ 21.530026] #0: (misc_mtx){--..}, at: [] misc_open+0x22/0x120 [ 21.530026] [ 21.530026] stack backtrace: [ 21.530026] Pid: 1379, comm: multipath.stati Not tainted 2.6.26-rc2-sched-devel.git #1205 [ 21.530026] [] print_circular_bug_tail+0x6e/0x80 [ 21.530026] [] __lock_acquire+0xa5d/0x1100 [ 21.530026] [] ? __lock_acquire+0x27c/0x1100 [ 21.530026] [] lock_acquire+0x76/0xa0 [ 21.530026] [] ? ecryptfs_miscdev_open+0x22/0x140 [ 21.530026] [] ? ecryptfs_miscdev_open+0x22/0x140 [ 21.530026] [] mutex_lock_nested+0x7a/0x280 [ 21.530026] [] ? ecryptfs_miscdev_open+0x22/0x140 [ 21.530026] [] ecryptfs_miscdev_open+0x22/0x140 [ 21.530026] [] misc_open+0x82/0x120 [ 21.530026] [] chrdev_open+0x86/0x150 [ 21.530026] [] __dentry_open+0xa9/0x260 [ 21.530026] [] nameidata_to_filp+0x47/0x60 [ 21.530026] [] ? chrdev_open+0x0/0x150 [ 21.530026] [] do_filp_open+0x184/0x7a0 [ 21.530026] [] ? kernel_map_pages+0xb9/0x140 [ 21.530026] [] ? poison_obj+0x2b/0x50 [ 21.530026] [] ? sub_preempt_count+0x4b/0x70 [ 21.530026] [] ? _spin_unlock+0x2c/0x50 [ 21.530026] [] do_sys_open+0x4a/0xb0 [ 21.530026] [] ? trace_hardirqs_on_thunk+0xc/0x10 [ 21.530026] [] sys_open+0x2e/0x40 [ 21.530026] [] syscall_call+0x7/0xb [ 21.530026] ======================= [ 36.921087] EXT3 FS on sda1, internal journal [ 38.441628] kjournald starting. Commit interval 5 seconds [ 38.441628] EXT3 FS on sda5, internal journal [ 38.511628] EXT3-fs: mounted filesystem with ordered data mode. [ 41.510014] PM: Removing info for No Bus:vcs1 [ 41.521496] PM: Removing info for No Bus:vcsa1 [ 41.581496] PM: Adding info for No Bus:vcs1 [ 41.590045] PM: Adding info for No Bus:vcsa1 [ 41.590045] PM: Removing info for No Bus:vcs1 [ 41.590045] PM: Removing info for No Bus:vcsa1 [ 41.603425] PM: Adding info for No Bus:vcs1 [ 41.603425] PM: Adding info for No Bus:vcsa1