Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933468AbbKMABh (ORCPT ); Thu, 12 Nov 2015 19:01:37 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:45048 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754547AbbKLXTC (ORCPT ); Thu, 12 Nov 2015 18:19:02 -0500 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Boris Brezillon , Brian Norris , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 039/155] mtd: nand: sunxi: fix sunxi_nand_chips_cleanup() Date: Thu, 12 Nov 2015 15:16:33 -0800 Message-Id: <1447370309-357-40-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447370309-357-1-git-send-email-kamal@canonical.com> References: <1447370309-357-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1380 Lines: 41 3.19.8-ckt10 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Boris BREZILLON commit 8e375ccda31ccc73b087134e263c48d2114534f4 upstream. The sunxi_nand_chips_cleanup() function is missing a call to list_del() which generates a double free error. Reported-by: Priit Laes Signed-off-by: Boris Brezillon Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support") Tested-by: Priit Laes Signed-off-by: Brian Norris Signed-off-by: Kamal Mostafa --- 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 d753659..fbb4c76 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -1306,6 +1306,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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/