--- linux-2.6.13-rc1/fs/namespace.c.orig 2005-07-03 20:30:18.000000000 +0200 +++ linux-2.6.13-rc1/fs/namespace.c 2005-07-03 20:31:54.000000000 +0200 @@ -1344,6 +1344,9 @@ goto out3; detach_mnt(new_nd.mnt, &parent_nd); detach_mnt(user_nd.mnt, &root_parent); + if (user_nd.mnt == current->namespace->root) { + root_parent.mnt = new_nd.mnt; /* avoid creating a mount loop */ + } attach_mnt(user_nd.mnt, &old_nd); /* mount old root on put_old */ attach_mnt(new_nd.mnt, &root_parent); /* mount new_root on / */ spin_unlock(&vfsmount_lock);