]> git.baikalelectronics.ru Git - kernel.git/commit
fix deadlock in pivot_root()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 18 Mar 2011 12:29:36 +0000 (08:29 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 18 Mar 2011 12:54:59 +0000 (08:54 -0400)
commit1127f4f628e067020b2cc386a5543a303e928b53
tree01e6510de480d3595ccff315d777770490e51f9c
parent3983fe425ede2953ce77f8c1d9448f721f5a20c5
fix deadlock in pivot_root()

Don't hold vfsmount_lock over the loop traversing ->mnt_parent;
do check_mnt(new.mnt) under namespace_sem instead; combined with
namespace_sem held over all that code it'll guarantee the stability
of ->mnt_parent chain all the way to the root.

Doing check_mnt() outside of namespace_sem in case of pivot_root()
is wrong anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c