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

2020-10-29 Thread Vignesh Raghavendra
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

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

2020-10-07 Thread Alexander Sverdlin
Hello Tudor, On 07/10/2020 10:48, tudor.amba...@microchip.com wrote: >> From: Alexander Sverdlin >> >> 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 str

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

2020-10-07 Thread Tudor.Ambarus
On 10/5/20 11:48 AM, Alexander A Sverdlin wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > From: Alexander Sverdlin > > spi_nor_parse_sfdp() modifies the passed structure so that it points to > itself (params.erase_map.regions to params.e

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

2020-10-05 Thread Alexander A Sverdlin
From: Alexander Sverdlin 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