[PATCH] jffs2: refactor csize in jffs2_do_read_inode_internal()

Artem Bityutskiy dedekind1 at gmail.com
Mon Apr 23 02:00:54 EDT 2012


On Mon, 2012-04-23 at 01:43 -0400, Xi Wang wrote:
> On Apr 22, 2012, at 7:57 AM, Artem Bityutskiy wrote:
> 
> > Please, introduce the variable in a separate patch.
> 
> Okay.
> 
> > WRT the csize check - you should compare it to something more sensible
> > than INT_MAX - try to dig the code and find out what is maximum value
> > JFFS2 expects. 
> 
> KMALLOC_MAX_SIZE - 1 is the smallest number I can find, since the code
> calls `kmalloc(csize + 1)'.  Does that look good?

I think JFFS2 has its own limit on the maximum size of the symlink
target. Probably it is PAGE_CACHE_SIZE, but not sure.

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120423/6a94529a/attachment.sig>


More information about the linux-mtd mailing list