Commit 2272905a authored by Emmanuel Nicolet's avatar Emmanuel Nicolet Committed by Michael Ellerman

spufs: fix a crash in spufs_create_root()

The spu_fs_context was not set in fc->fs_private, this caused a crash
when accessing ctx->mode in spufs_create_root().

Fixes: d2e0981c ("vfs: Convert spufs to use the new mount API")
Signed-off-by: default avatarEmmanuel Nicolet <emmanuel.nicolet@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20191008141342.GA266797@gmail.com
parent 7fe4e117
...@@ -761,6 +761,7 @@ static int spufs_init_fs_context(struct fs_context *fc) ...@@ -761,6 +761,7 @@ static int spufs_init_fs_context(struct fs_context *fc)
ctx->gid = current_gid(); ctx->gid = current_gid();
ctx->mode = 0755; ctx->mode = 0755;
fc->fs_private = ctx;
fc->s_fs_info = sbi; fc->s_fs_info = sbi;
fc->ops = &spufs_context_ops; fc->ops = &spufs_context_ops;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment