Linux-mtd Archive on
 help / color / Atom feed
From: Vignesh Raghavendra <>
To: Tudor Ambarus <>,
	Alexander A Sverdlin <>,
Cc: Richard Weinberger <>,
	Matija Glavinic Pecotic <>,
	Vignesh Raghavendra <>,,
	Miquel Raynal <>
Subject: Re: [PATCH] mtd: spi-nor: Don't copy self-pointing struct around
Date: Thu, 29 Oct 2020 10:15:08 +0530
Message-ID: <> (raw)
In-Reply-To: <>

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 mtd/fixes, thanks!
[1/1] mtd: spi-nor: Don't copy self-pointing struct around


Linux MTD discussion mailing list

      parent reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  8:48 Alexander A Sverdlin
2020-10-07  8:48 ` Tudor.Ambarus
2020-10-07  9:11   ` Alexander Sverdlin
2020-10-29  4:45 ` Vignesh Raghavendra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mtd Archive on

Archives are clonable:
	git clone --mirror linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ \
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone