From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34777 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbcBMXDN (ORCPT ); Sat, 13 Feb 2016 18:03:13 -0500 Subject: Patch "mtd: ubi: don't leak e if schedule_erase() fails" has been added to the 4.3-stable tree To: bigeasy@linutronix.de, gregkh@linuxfoundation.org, richard@nod.at Cc: , From: Date: Sat, 13 Feb 2016 15:03:12 -0800 Message-ID: <1455404592143168@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled mtd: ubi: don't leak e if schedule_erase() fails to the 4.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-ubi-don-t-leak-e-if-schedule_erase-fails.patch and it can be found in the queue-4.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 6b238de189f69dc77d660d4cce62eed15547f4c3 Mon Sep 17 00:00:00 2001 From: Sebastian Siewior Date: Thu, 26 Nov 2015 21:23:49 +0100 Subject: mtd: ubi: don't leak e if schedule_erase() fails From: Sebastian Siewior commit 6b238de189f69dc77d660d4cce62eed15547f4c3 upstream. If __erase_worker() fails to erase the EB and schedule_erase() fails as well to do anything about it then we go RO. But that is not a reason to leak the e argument here. Therefore clean up e. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Richard Weinberger Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/ubi/wl.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -1060,6 +1060,7 @@ static int __erase_worker(struct ubi_dev /* Re-schedule the LEB for erasure */ err1 = schedule_erase(ubi, e, vol_id, lnum, 0); if (err1) { + wl_entry_destroy(ubi, e); err = err1; goto out_ro; } Patches currently in stable-queue which might be from bigeasy@linutronix.de are queue-4.3/mtd-ubi-don-t-leak-e-if-schedule_erase-fails.patch queue-4.3/mtd-ubi-fixup-error-correction-in-do_sync_erase.patch queue-4.3/pci-host-mark-pcie-pci-msi-irq-cascade-handlers-as-irqf_no_thread.patch