lkml.org 
[lkml]   [2006]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.17-rc5-mm3-lockdep - locking error in quotaon
> 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.
Yes, it does. It was hard enough to get it to *lock* everything in
the right order and thus avoid all those nasty lock inversion problems so
unlocking is sometimes a bit arbitrary :)..

> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>

> ---
> 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);
>
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
-
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/

\
 
 \ /
  Last update: 2006-06-05 19:36    [W:0.041 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site