mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@linux.intel.com>
To: Valdis.Kletnieks@vt.edu
Cc: linux-kernel@vger.kernel.org, jack@suse.cz,
	Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: 2.6.17-rc5-mm3-lockdep - locking error in quotaon
Date: Mon, 05 Jun 2006 19:25:39 +0200	[thread overview]
Message-ID: <1149528339.3111.114.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <200606051700.k55H015q004029@turing-police.cc.vt.edu>

On Mon, 2006-06-05 at 13:00 -0400, Valdis.Kletnieks@vt.edu wrote:
> Using the -lockdep patch that Ingo had a few days ago, plus Stefan Richter's
> two patches for ieee1394 (which fixed the *first* locking issue I hit)....

> [  219.535000] quotaon/1374 is trying to release lock (&inode->i_mutex) at:
> [  219.535000]  [<c0382ba2>] mutex_unlock+0xd/0xf
> [  219.535000] but the next lock to release is:
> [  219.535000]  (&s->s_dquot.dqonoff_mutex){--..}, at: [<c0382a09>] mutex_lock+0xd/0xf


ok the quota code is playing fun games with unlock order..



The quota code nests 3 mutexes but releases them in a totally different
order; mark this as such in the code.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>


---
 fs/dquot.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.17-rc5-mm3/fs/dquot.c
===================================================================
--- linux-2.6.17-rc5-mm3.orig/fs/dquot.c
+++ linux-2.6.17-rc5-mm3/fs/dquot.c
@@ -1475,7 +1475,7 @@ static int vfs_quota_on_inode(struct ino
 		goto out_file_init;
 	}
 	mutex_unlock(&dqopt->dqio_mutex);
-	mutex_unlock(&inode->i_mutex);
+	mutex_unlock_non_nested(&inode->i_mutex);
 	set_enable_flags(dqopt, type);
 
 	add_dquot_ref(sb, type);


  reply	other threads:[~2006-06-05 17:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-05 17:00 Valdis.Kletnieks
2006-06-05 17:25 ` Arjan van de Ven [this message]
2006-06-05 17:35   ` Jan Kara
2006-06-05 19:20   ` Valdis.Kletnieks
2006-06-05 19:35     ` Jan Kara
2006-06-05 19:52       ` Arjan van de Ven
2006-06-05 20:06         ` Jan Kara
2006-06-05 20:15           ` Ingo Molnar
2006-06-05 20:26           ` Arjan van de Ven
2006-06-06  2:22             ` Valdis.Kletnieks
2006-06-06  8:33             ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1149528339.3111.114.camel@laptopd505.fenrus.org \
    --to=arjan@linux.intel.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@osdl.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®