Re: [PATCH] spufs: fix a crash in spufs_create_root()
On Tue, 2019-10-08 at 14:13:42 UTC, Emmanuel Nicolet wrote: > The spu_fs_context was not set in fc->fs_private, this caused a crash > when accessing ctx->mode in spufs_create_root(). > > Signed-off-by: Emmanuel Nicolet Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/2272905a4580f26630f7d652cc33935b59f96d4c cheers
[PATCH] 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(). Signed-off-by: Emmanuel Nicolet --- arch/powerpc/platforms/cell/spufs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 1d93e55a2de1..2dd452a047cd 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -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 = _context_ops; return 0; -- 2.23.0
Re: [PATCH] spufs: fix a crash in spufs_create_root()
On Tue, Oct 8, 2019 at 4:13 PM Emmanuel Nicolet wrote: > > The spu_fs_context was not set in fc->fs_private, this caused a crash > when accessing ctx->mode in spufs_create_root(). > > Signed-off-by: Emmanuel Nicolet Fixes: d2e0981c3b9a ("vfs: Convert spufs to use the new mount API") Acked-by: Arnd Bergmann > arch/powerpc/platforms/cell/spufs/inode.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/platforms/cell/spufs/inode.c > b/arch/powerpc/platforms/cell/spufs/inode.c > index 1d93e55a2de1..2dd452a047cd 100644 > --- a/arch/powerpc/platforms/cell/spufs/inode.c > +++ b/arch/powerpc/platforms/cell/spufs/inode.c > @@ -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 = _context_ops; > return 0; > -- > 2.23.0 >