Commits

Peng Fan committed f21ddfdc339
MLK-11393 mtd: blkdevs: fix multiplication overflow The type of new->size is unsigned long and the type of tr->blksize is int, the result of 'new->size * tr->blksize' may exceed ULONG_MAX on 32bit machines. Take nand chip MT29F32G08CBADBWP which is 4GB for example. The parameters passed to kernel is 'mtdparts=gpmi-nand:-(user)', the whole nand chip will be treated as a 4GB mtd partition. new->size is 0x800000 and tr->blksize is 0x200, 'new->size * tr->blksize' however is 0. This is what we do not want to see. Type cast new->size to u64 to fix the multiplication overflow issue. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 5e3aae04da7488ebb02cb22810ccd3e30226cf3f)