lkml.org 
[lkml]   [2013]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VFS deadlock ?
On Thu, Mar 21, 2013 at 04:58:41PM -0700, Linus Torvalds wrote:

> And the only other reason we don't want to allow it is to make sure
> you can't have directory loops etc, afaik, and again, for this
> particular case of /proc, we happen to be ok.

Not really. Do that and yes, this deadlock goes away. But the locking
order in general goes to hell - we order directory inodes by "which dentry
is an ancestor of another?" So we have no warranty that we won't get
alias1/foo/bar/baz < alias2/foo. Take rename_lock() on those two and
have it race with rmdir alias2/foo/bar/baz (locks alias2/foo/bar, then
alias2/foo/bar/baz) and rmdir alias2/foo/bar (locks alias2/foo and
alias2/foo/bar). Oops - we have a cycle now...


\
 
 \ /
  Last update: 2013-03-22 01:21    [W:0.418 / U:0.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site