Messages in this thread Patch in this message |  | | Date | Sat, 31 May 2014 07:48:19 -0700 (PDT) | | From | Linus Torvalds <> | | Subject | Re: [git pull] Re: fs/dcache.c - BUG: soft lockup - CPU#5 stuck for 22s! [systemd-udevd:1667] |
| |
On Sat, 31 May 2014, Josh Boyer wrote: > > One of my machines got the lockdep report below when booting a kernel > that contained these patches.
I think this is just a lacking annotation.
We do nest dentry d_lock locking, and in order to avoid ABBA deadlocks the rule is that we lock things in topological order (parent dentry first). lock_parent() is very careful about that, but doesn't actually tell lockdep about it.
This trivial oneliner should fix it.
Linus
--- fs/dcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dcache.c b/fs/dcache.c index bce851dc03ef..be2bea834bf4 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -553,7 +553,7 @@ again: } rcu_read_unlock(); if (parent != dentry) - spin_lock(&dentry->d_lock); + spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); else parent = NULL; return parent;
|  |