Files
linux-apfs/drivers/mtd/ubi
Vinit Agnihotri d08c3b78b8 UBI: fix overflow bug
I was experiencing overflows in multiplications for
volume->used_bytes in vmt.c & vtbl.c, while creating & resizing large volumes.

vol->used_bytes is long long however its 2 operands vol->used_ebs &
vol->usable_leb_size
are int. So their multiplication for larger values causes integer overflows.
Typecasting them solves the problem.

My machine & flash details:

64Bit dual-core AMD opteron, 1 GB RAM, linux 2.6.18.3.
mtd size = 6GB, volume size= 5GB, peb_size = 4MB.

heres patch which does the fix.

Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-07-18 16:58:12 +03:00
..
2007-07-18 16:56:13 +03:00
2007-07-18 16:53:36 +03:00
2007-07-18 16:55:55 +03:00
2007-07-18 16:55:55 +03:00
2007-07-18 16:56:24 +03:00
2007-07-18 16:52:51 +03:00
2007-07-18 16:57:34 +03:00
2007-07-18 16:52:42 +03:00
2007-04-27 14:23:33 +03:00
2007-04-27 14:23:33 +03:00
2007-04-27 14:23:33 +03:00
2007-07-18 16:53:08 +03:00
2007-07-18 16:58:02 +03:00
2007-07-18 16:52:32 +03:00
2007-07-18 16:53:08 +03:00
2007-07-18 16:53:08 +03:00
2007-07-18 16:58:12 +03:00
2007-07-18 16:58:12 +03:00
2007-07-18 16:53:49 +03:00