[PATCH] jffs2: refactor csize in jffs2_do_read_inode_internal()

Xi Wang xi.wang at gmail.com
Mon Apr 23 01:43:57 EDT 2012


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?

- xi



More information about the linux-mtd mailing list