Skip to content

Commit

Permalink
spufs: fix a crash in spufs_create_root()
Browse files Browse the repository at this point in the history
The spu_fs_context was not set in fc->fs_private, this caused a crash
when accessing ctx->mode in spufs_create_root().

Fixes: d2e0981 ("vfs: Convert spufs to use the new mount API")
Signed-off-by: Emmanuel Nicolet <emmanuel.nicolet@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20191008141342.GA266797@gmail.com
  • Loading branch information
Emmanuel Nicolet authored and Michael Ellerman committed Oct 11, 2019
1 parent 7fe4e11 commit 2272905
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ static int spufs_init_fs_context(struct fs_context *fc)
ctx->gid = current_gid();
ctx->mode = 0755;

fc->fs_private = ctx;
fc->s_fs_info = sbi;
fc->ops = &spufs_context_ops;
return 0;
Expand Down

0 comments on commit 2272905

Please sign in to comment.