Bug in mtd_speedtest?

Artem Bityutskiy dedekind1 at gmail.com
Fri Mar 4 01:59:42 EST 2011


On Thu, 2011-03-03 at 17:45 -0600, David Lambert wrote:
> I think I may have found an overflow condition in the speed calculation 
> of mtd_speedtest on some platforms with larger flash partitions:
> 
> Consider for example if goodebcnt = 15000, and mtd->erasesize = 
> 256*1024, then there is an intermediate product of  3932160000 which 
> results in the sign bit being set on a 32 bit integer. Maybe k should be 
> an unsigned long long?

Please, just send a patch :-)

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list