1 From: Miklos Szeredi <mszeredi@suse.cz>
2 Subject: fix oops in d_namespace_path
6 d_namespace_path uses the current->fs->root to get the current
7 namespace. If root is detached root.mnt->mnt_ns will be NULL, causing
8 an Oops. Fix by checking this before dereferencing the mnt_ns.
10 Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 1 file changed, 1 insertion(+), 1 deletion(-)
17 @@ -2370,7 +2370,7 @@ char *d_namespace_path(struct dentry *de
18 path_get(¤t->fs->root);
19 read_unlock(¤t->fs->lock);
20 spin_lock(&vfsmount_lock);
22 + if (root.mnt && root.mnt->mnt_ns)
23 ns_root.mnt = mntget(root.mnt->mnt_ns->root);
25 ns_root.dentry = dget(ns_root.mnt->mnt_root);