From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 14 Nov 2011 09:27:44 -0800 From: "Paul E. McKenney" To: Luis Henriques Cc: Peter Zijlstra , Greg KH , Andrew Morton , Vasiliy Kulikov , Miles Lane , LKML , Ingo Molnar , Alexey Dobriyan , stable@vger.kernel.org Subject: Re: Linus GIT - INFO: possible circular locking dependency detected Message-ID: <20111114172744.GA5924@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20111103204930.GA3599@hades> <20111105093146.GA14338@albatros> <20111108155716.33c04ce1.akpm@linux-foundation.org> <20111109001723.GA26225@kroah.com> <20111109004013.GA30562@kroah.com> <20111109191155.GB2490@hades> <1320868332.19727.19.camel@twins> <20111109200553.GA3043@hades> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111109200553.GA3043@hades> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Wed, Nov 09, 2011 at 08:05:53PM +0000, Luis Henriques wrote: > On Wed, Nov 09, 2011 at 08:52:12PM +0100, Peter Zijlstra wrote: > > On Wed, 2011-11-09 at 19:11 +0000, Luis Henriques wrote: > > > [ 12.948038] -> #0 (&sig->cred_guard_mutex){+.+.+.}: > > > [ 12.948038] [] __lock_acquire+0x17bf/0x2020 > > > [ 12.948038] [] lock_acquire+0xaf/0x1f0 > > > [ 12.948038] [] __mutex_lock_common+0x65/0x4d0 > > > [ 12.948038] [] mutex_lock_killable_nested+0x1b/0x20 > > > [ 12.948038] [] lock_trace+0x2e/0x80 > > > [ 12.948038] [] proc_readfd_common+0x5b/0x4b0 > > > [ 12.948038] [] proc_readfd+0x15/0x20 > > > [ 12.948038] [] vfs_readdir+0xb0/0xd0 > > > [ 12.948038] [] sys_getdents+0x89/0x100 > > > [ 12.948038] [] system_call_fastpath+0x16/0x1b > > > > > > sb->s_type->i_mutex_key is shown as being acquired in the execve path, > > > which seems to be wrong -- it was acquired in the vfs_readdir (on the 2nd > > > trace). > > > > > > This means that the initial analysis from Vasiliy is incorrect, as he > > > assumed the execve path. Or Am I interpreting this log incorrectly? > > > (Probably I am...). > > > > ->#0 shows where sig->cred_guard_mutex was taken, as it was the first > > lock there is no nesting yet and therefore the ->i_mutex_key#6 thing > > should not be associated with this stacktrace. > > > > ->#1 shows where ->i_mutex_key#6 was taken while holding > > ->cred_guard_mutex (but doesn't explicitly show where that was taken). > > > > Mostly ->#0 information is useless in lockdep reports and can be safely > > ignored. > > Interesting. Thank you for the clarification. I understood it the other > way around, as the log starts with: > > [ 12.948038] exe/36 is trying to acquire lock: > [ 12.948038] (&sig->cred_guard_mutex){+.+.+.}, at: [] lock_trace+0x2e/0x80 > [ 12.948038] > [ 12.948038] but task is already holding lock: > [ 12.948038] (&sb->s_type->i_mutex_key#6){+.+.+.}, at: [] vfs_readdir+0x78/0xd0 > > This is why I thought the "useless information" was in ->#1 (for the > i_mutex_key#6). FWIW, I am seeing this as well now that I have rebased -rcu to 3.2-rc1. Thanx, Paul