[PATCH 08/10] mtd-utils: nandwrite: prevent 32-bit overflow

Artem Bityutskiy dedekind1 at gmail.com
Tue Nov 9 07:20:56 EST 2010

On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> For large block- and page-sizes, the multiplication of ebsize_aligned
> and pagelen can overflow a 32-bit integer.  This overflow can be
> prevented by a simple change in order of operations (i.e., do division
> first).
> Since ebsize_aligned is always a multiple of mtd.min_io_size, this
> produces no change in results.
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>

Brian, increasingly have less and less time for mtd, but I remember
about your patches - I'll pick them as soon as I have some time. You can
meanwhile address Mikes comments.

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

More information about the linux-mtd mailing list