[PATCH] spufs: fix a crash in spufs_create_root()

Arnd Bergmann arnd at arndb.de
Wed Oct 9 02:57:52 AEDT 2019


On Tue, Oct 8, 2019 at 4:13 PM Emmanuel Nicolet
<emmanuel.nicolet at gmail.com> 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 <emmanuel.nicolet at gmail.com>

Fixes: d2e0981c3b9a ("vfs: Convert spufs to use the new mount API")
Acked-by: Arnd Bergmann <arnd at arndb.de>

>  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 = &spufs_context_ops;
>         return 0;
> --
> 2.23.0
>


More information about the Linuxppc-dev mailing list