Re: [PATCH 2/7] omfs: add inode routines

From: Alan Cox
Date: Sun Apr 13 2008 - 05:22:19 EST



> + * so we have to walk the tree. Both inodes and file data are allocated
> + * from the same map. This array can be big (300k) so we allocate
> + * in units of the blocksize.

sbi->s_num_blocks doesn't appear to be validated at the time of mount ?

> +static int omfs_fill_super(struct super_block *sb, void *data, int silent)
> +{

> + sbi->s_num_blocks = be64_to_cpu(omfs_sb->s_num_blocks);
> + sbi->s_blocksize = be32_to_cpu(omfs_sb->s_blocksize);
> + sbi->s_mirrors = be32_to_cpu(omfs_sb->s_mirrors);
> + sbi->s_root_ino = be64_to_cpu(omfs_sb->s_root_block);
> + sbi->s_sys_blocksize = be32_to_cpu(omfs_sb->s_sys_blocksize);

Several of these look like they should be checked before use elsewhere in
the code (eg blocksize is fed into shifts later)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/