[U-Boot] [PATCH] ubifsmount fails due to not initialized list

Quotient Remainder quotientvremainder at gmail.com
Wed May 5 13:21:10 CEST 2010


On Wed, Apr 21, 2010 at 8:47 AM, Stefano Babic <sbabic at denx.de> wrote:

> ubifsmount is not working and causes an access with
> a pointer set to zero because the ubifs_fs_type
> is not initialized correctly.
>
> Signed-off-by: Stefano Babic <sbabic at denx.de>
> ---
>  fs/ubifs/super.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> index 391dea4..39e3efe 100644
> --- a/fs/ubifs/super.c
> +++ b/fs/ubifs/super.c
> @@ -1178,6 +1178,7 @@ int ubifs_mount(char *vol_name)
>                ubifs_umount(ubifs_sb->s_fs_info);
>
>        INIT_LIST_HEAD(&ubifs_infos);
> +       INIT_LIST_HEAD(&ubifs_fs_type.fs_supers);
>
>        /*
>         * Mount in read-only mode
> --
> 1.6.3.3
>
> Out of interest, how did something like this get away with only causing an
occasional failure?


> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list