linux/drivers/mtd
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
..
chips [MTD] [CHIPS] Remove MTD_OBSOLETE_CHIPS (jedec, amd_flash, sharp) 2007-05-09 13:34:37 +01:00
devices [MIPS] Remove Momenco Ocelot C support 2007-07-10 17:33:01 +01:00
maps [MIPS] remove LASAT Networks platforms support 2007-07-10 17:33:04 +01:00
nand [MIPS] Remove Momenco Ocelot C support 2007-07-10 17:33:01 +01:00
onenand Fix occurrences of "the the " 2007-05-09 08:57:56 +02:00
ubi UBI: fix overflow bug 2007-07-18 16:58:12 +03:00
afs.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
Makefile [MTD] generalise the handling of MTD-specific superblocks 2007-05-11 12:14:15 +01:00
mtd_blkdevs.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
mtdblock_ro.c
mtdblock.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdpart.c [MTD] Delete allegedly obsolete "bank_size" field of mtd_info. 2007-05-09 13:26:52 +01:00
mtdsuper.c [MTD] Fix error checking after get_mtd_device() in get_sb_mtd functions 2007-06-01 19:21:59 +01:00
nftlcore.c
nftlmount.c
redboot.c
rfd_ftl.c
ssfdc.c