Received: by 10.192.165.148 with SMTP id m20csp2489997imm; Sun, 22 Apr 2018 08:06:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/HbM0a0vI2KzldHxxBZVr1C64WJqXBq2A6KR/Vpn6yzRaj0l2B4wtcXOGNc0TEElx1lmCL X-Received: by 10.101.98.202 with SMTP id m10mr9231241pgv.348.1524409576662; Sun, 22 Apr 2018 08:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524409576; cv=none; d=google.com; s=arc-20160816; b=xg5KQ5Ct7at4+keXoJAaY5kajaaGjdlMD1C+Plr8f4AAR3N8UmeTACj/E/T3ugvx8k eCmgbNhVxvh8F2F6ooU/OYpLa8dADZ+rhUmdn/uKs0a5CKpGpo1jG5JV9+aZyvq5xQSo dpipj7OSJmZu27Q+IQ8PRrtsyCS07q3bnCjDNIA8yVVECSzzIe5cUPkRSGUGs9AQzaSI k+So35VC10l2VDgbQ8mZpUqzo1N83FFoTVBpmbEtNuRHwyreqQSHuC+9BpMi5dO7Kv2h J4e9vW2gUQg571OxwT4etqlCfILRHFjA/7UDiN4aYAvT7n0DY15q7mLrVlhpSFKQ4x/l K5wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=SJnV6uSeWLxKZeCesL0LdvBSR89qgy2XIwhNPtiTfUo=; b=AoupzHylBnFrnq4FIeydFU8U7PZ7xEO1F0QlEbVTiD9HpNLxWCYFGgOMed25f2N0T7 WwA5K2osCkSoFWWxtLTcqMIeBLre/VhJyenGFPrKKpbMYRQvUqCAhFGnu1VsukeE4SMG 0ObtsJVfN8e4ycqQ2iBlWo1pFxNyzbKhySQhRvNc9KjxlZebH5kfSuVpVnlmyi8HOUMG Z9pErcSt0tb9zN1lXUVsJqbI/GrG0MeRVJO4J4jkK7CAGb0pHIMSJoUvuQSTrY87nl+b 4mTu8BiveXEKCY8HduuMcYWqCoNgc7uX3PaHNJrPYpJzFfJfvsbAUXNILH9RB549OxEP YruQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z79si9854368pfa.120.2018.04.22.08.06.02; Sun, 22 Apr 2018 08:06:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756582AbeDVOLw (ORCPT + 99 others); Sun, 22 Apr 2018 10:11:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54532 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756037AbeDVOLn (ORCPT ); Sun, 22 Apr 2018 10:11:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6EDC0C97; Sun, 22 Apr 2018 14:11:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Townsend , Richard Weinberger Subject: [PATCH 4.9 03/95] ubi: fastmap: Dont flush fastmap work on detach Date: Sun, 22 Apr 2018 15:52:32 +0200 Message-Id: <20180422135210.576881043@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Richard Weinberger commit 29b7a6fa1ec07e8480b0d9caf635a4498a438bf4 upstream. At this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures. Reported-by: Martin Townsend Fixes: 74cdaf24004a ("UBI: Fastmap: Fix memory leaks while closing the WL sub-system") Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/ubi/fastmap-wl.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/mtd/ubi/fastmap-wl.c +++ b/drivers/mtd/ubi/fastmap-wl.c @@ -362,7 +362,6 @@ static void ubi_fastmap_close(struct ubi { int i; - flush_work(&ubi->fm_work); return_unused_pool_pebs(ubi, &ubi->fm_pool); return_unused_pool_pebs(ubi, &ubi->fm_wl_pool);