Re: 2.6.17-rc5-mm3-lockdep - locking error in quotaon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-06-05 at 13:00 -0400, [email protected] 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 <[email protected]>


---
 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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux