Received: by 10.192.165.148 with SMTP id m20csp2540998imm; Sun, 22 Apr 2018 09:10:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx485WZyNpcmY3WWoBNcnG8zx9o8ltAs3xci9umcbx62txNLCUaVSx+E7KHwKOPkYBeH8tjrn X-Received: by 10.99.191.12 with SMTP id v12mr14645677pgf.54.1524413425720; Sun, 22 Apr 2018 09:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413425; cv=none; d=google.com; s=arc-20160816; b=CkkNhohErcxOmCHmBcTbhpgEN+wYNUD8Ham7TcxCbPR7CR5CbgoiRve3tgWyvQPp6K rrc+hwdbamHeuL28AP3FH9QUMFuaLI9OfHN1iRHWRRFo6HnHQ3EJLqxr92RGQxfS3jUt iF5713G1Biwj/lFPmNia7BzUHvT+s6U8E7C39mASE1vAZzbiKBIiG/7cQb3eJuZhHjoM nPCWYwfIHACHIFReomYtaGq12/PV5ZVmVUl+TJyrIQqC3b5j/AbRZoSw96jPLlDF+GdN 1fFKKnVSSwm4lu/SGpwS26m8+c9wP25ifoMbCOIyxYHXfZcCVtOPfiHup69iCe4RHccU yu/w== 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=g2P7h1fbhq9iE5Exg8DAx3tntHnkiur14yEIWi2J2ek=; b=GbEbsZ7swreeIpjieAUqJhtRKukOHpNheOidAm4RbRFGmopRgbR3Kn9ePHk33XzVj7 jrkjtVeDo84O31SJ7a1kbNdjg80tUqI+Y2BotEGADhgx9tuuVcthn0VLVi2LQ/oRwmfg T9auz5HQt1omIiHaZ3DAs1ou6xA2n1cHsWV5NxBpVy1AXbpoh5DUTvcBVXl18/HdSRqM XXwSDsAGTlVnN7+Yqv4b5Gzcv7+qzEVaTAF8GJ7n/ueUFJcA2BEy5dqcXa4WK6aBJhcl wyrlHBrPsXnxh2/OdaqDHTwBcj9UGLFl4eU0aRBRliQDpA+Mlh1sG3HFZfSeuNPoWduZ L5sQ== 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 r7-v6si9620546pls.591.2018.04.22.09.10.11; Sun, 22 Apr 2018 09:10:25 -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 S1753815AbeDVN4g (ORCPT + 99 others); Sun, 22 Apr 2018 09:56:36 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45218 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753802AbeDVN4c (ORCPT ); Sun, 22 Apr 2018 09:56:32 -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 5A5BAC64; Sun, 22 Apr 2018 13:56:31 +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.16 005/196] ubi: fastmap: Dont flush fastmap work on detach Date: Sun, 22 Apr 2018 15:50:25 +0200 Message-Id: <20180422135104.511311996@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@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.16-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);