Re: [PATCH] mtd: spi-nor: Don't copy self-pointing struct around

From: Vignesh Raghavendra
Date: Thu Oct 29 2020 - 09:55:40 EST


On Mon, 5 Oct 2020 10:48:03 +0200, Alexander A Sverdlin wrote:
> spi_nor_parse_sfdp() modifies the passed structure so that it points to
> itself (params.erase_map.regions to params.erase_map.uniform_region). This
> makes it impossible to copy the local struct anywhere else.
>
> Therefore only use memcpy() in backup-restore scenario. The bug may show up
> like below:
>
> [...]

Updated Fixes tag as suggested by Tudor.
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks!
[1/1] mtd: spi-nor: Don't copy self-pointing struct around
https://git.kernel.org/mtd/c/69a8eed58c

--
Regards
Vignesh