summaryrefslogtreecommitdiffstats
path: root/fs/kernfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-04-03 00:22:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-05-21 14:30:08 -0400
commit82382acec0c97b91830fff7130d0acce4ac4f3f3 (patch)
tree916207a3a6819177f57c5509e81d7446dd47aba2 /fs/kernfs
parent08a8f3086880325433d66b2dc9cdfb3f095adddf (diff)
downloadlinux-82382acec0c97b91830fff7130d0acce4ac4f3f3.tar.gz
linux-82382acec0c97b91830fff7130d0acce4ac4f3f3.tar.bz2
linux-82382acec0c97b91830fff7130d0acce4ac4f3f3.zip
kernfs: deal with kernfs_fill_super() failures
make sure that info->node is initialized early, so that kernfs_kill_sb() can list_del() it safely. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/kernfs')
-rw-r--r--fs/kernfs/mount.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 26dd9a50f383..ff2716f9322e 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -316,6 +316,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags,
info->root = root;
info->ns = ns;
+ INIT_LIST_HEAD(&info->node);
sb = sget_userns(fs_type, kernfs_test_super, kernfs_set_super, flags,
&init_user_ns, info);