[PATCH v2] mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards

Miquel Raynal miquel.raynal at bootlin.com
Thu Jul 15 15:50:26 PDT 2021


On Mon, 2021-07-12 at 07:54:52 UTC, Andreas Persson wrote:
> Erasing an AMD linear flash card (AM29F016D) crashes after the first
> sector has been erased. Likewise, writing to it crashes after two bytes
> have been written. The reason is a missing check for a null pointer -
> the cmdset_priv field is not set for this type of card.
> 
> Fixes: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register")
> Signed-off-by: Andreas Persson <andreasp56 at outlook.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.

Miquel



More information about the linux-mtd mailing list