[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080413101743.7d762e58@core>
Date: Sun, 13 Apr 2008 10:17:43 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Bob Copeland <me@...copeland.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
akpm@...ux-foundation.org, Bob Copeland <me@...copeland.com>
Subject: Re: [PATCH 2/7] omfs: add inode routines
> + * 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists