+++ /dev/null
-From: Miklos Szeredi <mszeredi@suse.cz>
-Subject: fix oops in d_namespace_path
-Patch-mainline: no
-References: bnc#433504
-
-d_namespace_path uses the current->fs->root to get the current
-namespace. If root is detached root.mnt->mnt_ns will be NULL, causing
-an Oops. Fix by checking this before dereferencing the mnt_ns.
-
-Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
----
- fs/namespace.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/fs/namespace.c
-+++ b/fs/namespace.c
-@@ -2312,7 +2312,7 @@ char *d_namespace_path(struct dentry *de
- path_get(¤t->fs->root);
- read_unlock(¤t->fs->lock);
- spin_lock(&vfsmount_lock);
-- if (root.mnt)
-+ if (root.mnt && root.mnt->mnt_ns)
- ns_root.mnt = mntget(root.mnt->mnt_ns->root);
- if (ns_root.mnt)
- ns_root.dentry = dget(ns_root.mnt->mnt_root);