[PATCH v3] mtd: block2mtd: Fix divide error when erase_size is zero

Miquel Raynal miquel.raynal at bootlin.com
Fri Sep 4 10:37:43 PDT 2026


On Thu, 13 Aug 2026 10:48:12 +0800, Pei Xiao wrote:
> The erase size is parsed from the "block2mtd" module parameter and can
> be set to zero. add_device() then evaluates
> 
>         if (size % erase_size)
> 
> with a zero divisor, which triggers a divide error:
> 
> [...]

Applied to mtd/fixes, thanks!

[1/1] mtd: block2mtd: Fix divide error when erase_size is zero
      commit: b5965c4221165045e19736794ca5f48ae3d67142

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl




More information about the linux-mtd mailing list