linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
@ 2015-09-13 16:14 Boris Brezillon
  2015-09-13 16:26 ` [linux-sunxi] " Priit Laes
  2015-09-22  0:15 ` Brian Norris
  0 siblings, 2 replies; 4+ messages in thread
From: Boris Brezillon @ 2015-09-13 16:14 UTC (permalink / raw)
  To: linux-arm-kernel

The sunxi_nand_chips_cleanup() function is missing a call to list_del()
which generates a double free error.

Reported-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: <stable@vger.kernel.org> # 3.19+
Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support")
---
 drivers/mtd/nand/sunxi_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index f9b5a4c..0467917 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1388,6 +1388,7 @@ static void sunxi_nand_chips_cleanup(struct sunxi_nfc *nfc)
 					node);
 		nand_release(&chip->mtd);
 		sunxi_nand_ecc_cleanup(&chip->nand.ecc);
+		list_del(&chip->node);
 	}
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-22  7:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-13 16:14 [PATCH] mtd: nand: sunxi: fix sunxi_nand_chips_cleanup() Boris Brezillon
2015-09-13 16:26 ` [linux-sunxi] " Priit Laes
2015-09-22  0:15 ` Brian Norris
2015-09-22  7:52   ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).