From: Miklos Szeredi Date: Tue, 6 Sep 2005 22:19:36 +0000 (-0700) Subject: [PATCH] pivot_root() circular reference fix X-Git-Tag: v2.6.14-rc1~549 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bb6fcc13ae4fad98e0d610458975e47be0d2203;p=pandora-kernel.git [PATCH] pivot_root() circular reference fix Fix http://bugzilla.kernel.org/show_bug.cgi?id=4857 When pivot_root is called from an init script in an initramfs environment, it causes a circular reference in the mount tree. The cause of this is that pivot_root() is not prepared to handle pivoting an unattached mount. In an initramfs environment, rootfs is the root of the namespace, and so it is not attached. This patch fixes this and related problems, by returning -EINVAL if either the current root or the new root is detached. Signed-off-by: Miklos Szeredi Acked-by: Al Viro Cc: Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed