[PATCH] JFFS2 Fix of panics caused by wrong condition for hole frag creation in write_begin
dwmw2 at infradead.org
Mon Apr 14 15:40:28 EDT 2008
On Mon, 2008-04-14 at 17:55 +0100, Alexey Korolev wrote:
> JFFS2 in Linux 2.6.24 fails to kernel panic on random read/write/truncate operatons. We investigated the issue it is caused by
> bug in conditions for hole fragment creation in write_begin function. Offset of starting offset which is used to identify should we create hole frag or not is calculated improperly.
> As result hole frags are not created when they must be - it leads to internal memory corruptions and kernel panic.
> The following patch fixes the bug in JFFS2 write_begin hole frag conditions.
> Please include the patch.
Well spotted, Alexey. Thanks!
I've simplified it a little and sent it to Linus.
More information about the linux-mtd