mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Jesper Juhl" <jesper.juhl@gmail.com>
Cc: linux-kernel@vger.kernel.org, reiser@namesys.com,
	viro@zeniv.linux.org.uk, viro@ftp.linux.org.uk,
	reiserfs-dev@namesys.com, reiserfs-list@namesys.com,
	Ingo Molnar <mingo@elte.hu>,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: possible recursive locking detected - while running fs operations in loops - 2.6.18-rc2-git5
Date: Tue, 25 Jul 2006 22:33:27 -0700	[thread overview]
Message-ID: <20060725223327.b6d039b2.akpm@osdl.org> (raw)
In-Reply-To: <9a8748490607251516j1433306ek9c64cc84c0838f7b@mail.gmail.com>

On Wed, 26 Jul 2006 00:16:42 +0200
"Jesper Juhl" <jesper.juhl@gmail.com> wrote:

> I just got this from the lock validator :
> 
> =============================================
> [ INFO: possible recursive locking detected ]
> ---------------------------------------------
> rm/2498 is trying to acquire lock:
>  (&inode->i_mutex){--..}, at: [<c031c3ac>] mutex_lock+0x1c/0x20
> 
> but task is already holding lock:
>  (&inode->i_mutex){--..}, at: [<c031c3ac>] mutex_lock+0x1c/0x20
> 
> other info that might help us debug this:
> 2 locks held by rm/2498:
>  #0:  (&inode->i_mutex/1){--..}, at: [<c017b6f3>] do_rmdir+0x73/0xe0
>  #1:  (&inode->i_mutex){--..}, at: [<c031c3ac>] mutex_lock+0x1c/0x20
> 
> stack backtrace:
>  [<c0103faa>] show_trace_log_lvl+0x12a/0x150
>  [<c0103fe2>] show_trace+0x12/0x20
>  [<c01040f9>] dump_stack+0x19/0x20
>  [<c0138a19>] print_deadlock_bug+0xb9/0xd0
>  [<c0138a9b>] check_deadlock+0x6b/0x80
>  [<c013a344>] __lock_acquire+0x354/0x990
>  [<c013b0a5>] lock_acquire+0x75/0xa0
>  [<c031c430>] __mutex_lock_slowpath+0x70/0x2a0
>  [<c031c3ac>] mutex_lock+0x1c/0x20
>  [<c01ac8b3>] reiserfs_delete_inode+0x63/0xd0
>  [<c01854e1>] generic_delete_inode+0x61/0xe0
>  [<c01856af>] generic_drop_inode+0xf/0x20
>  [<c0185716>] iput+0x56/0x80
>  [<c01826de>] dentry_iput+0x5e/0xc0
>  [<c01827e8>] dput+0xa8/0x170
>  [<c0182c0b>] prune_one_dentry+0x6b/0x80
>  [<c0182d7b>] prune_dcache+0x15b/0x170
>  [<c0182ff0>] shrink_dcache_parent+0x10/0x20
>  [<c017b55a>] dentry_unhash+0x5a/0xc0
>  [<c017b61f>] vfs_rmdir+0x5f/0xc0
>  [<c017b74d>] do_rmdir+0xcd/0xe0
>  [<c017b770>] sys_rmdir+0x10/0x20
>  [<c010304b>] syscall_call+0x7/0xb
>  [<b7e79d7d>] 0xb7e79d7d

The VFS takes the directory i_mutex and reiserfs_delete_inode() takes the
to-be-deleted file's i_mutex.

That's notabug and lockdep will need to be taught about it.

That being said, the reiserfs locking appears to be unneeded - this inode
is going down and nobody else can look it up, so what is to be locked
against?

  parent reply	other threads:[~2006-07-26  5:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25 22:16 Jesper Juhl
2006-07-25 23:29 ` Andreas Dilger
2006-07-29 22:18   ` Jesper Juhl
2006-07-29 23:08     ` Hans Reiser
2006-07-30  6:17       ` Jesper Juhl
2006-07-30  0:46         ` Hans Reiser
2006-07-30 10:08           ` Jesper Juhl
2006-07-31 19:34         ` Alexander Zarochentsev
2006-07-26  5:33 ` Andrew Morton [this message]
2006-07-26  6:32   ` [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode Arjan van de Ven
2006-07-26  6:38     ` Arjan van de Ven
2006-07-26  6:47   ` Arjan van de Ven
2006-07-26  7:04     ` Andrew Morton

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=20060725223327.b6d039b2.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=reiser@namesys.com \
    --cc=reiserfs-dev@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=viro@ftp.linux.org.uk \
    --cc=viro@zeniv.linux.org.uk \
    /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®