Received: by 10.192.165.148 with SMTP id m20csp2475575imm; Sun, 22 Apr 2018 07:49:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx48oOwDG2i4Z3Uj+RuYxdp+IO+bGHyZDVKmHlGqiCRNIxw4aHBo9+fa0yeW3b7ggi520adYg X-Received: by 10.99.127.86 with SMTP id p22mr14525754pgn.306.1524408597226; Sun, 22 Apr 2018 07:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408597; cv=none; d=google.com; s=arc-20160816; b=lompS0TAzHEHnL1k9CZKWoGhk6BHMueZsxeebaTDnpeunxMb0cZhC00sGRTTtpmZtS vt4m2zKwiyZB0psd1jWJ/tvBb15wrWe7jIDvUxRuGsN0SBTF1mg0wwNRX31rDcdt+Lz6 L7GRuAbxoZ+xeWZ/5ncS40RJ4n4PO1GHmUJBFSqSmN9Kxe80k23p+CZJjNQgCI0mhf+k KmgvwLb6xASl2ybuhkn8ISftzYtJotA2zhQ2UjqjLJ8Mcv09Cm9lMP6ixhEJwWZ7J3BU RY9maefQYU+sI58RUt3EQ8hBye2aBERextTP3JQttJgBsrIsZmDklNptwK1i2JWn1IdI i+zg== 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=3ROy6VOEZJeJ33r+H0/FN3Fr5M93MFPAjG/Md/aNYN4=; b=j/7/mtfHMr92DoGthZbYfeKoxHJs1xIFUJpauj+iUx13GPUVL/r2vQHVj3K6oju6Hm 3OupwywM0w0GG8CUvG07bBSBmBSufGwtduFuaInkJ86vRLapNEDs+Nq1592ba1Myo98Q /TYujyahdATBnsYjJedcbvc/rpJ7rm2nP8TLvFxAfi6/A5he8tuuEqQVySkAQezuPNNv khOu3RpcpJe1FonliJszGdHlFcX9UulUXXUowoFfLWcWjl9rLoAUDRUH99t5XV4EawVN 7cQbowcxIDpqhV9b85Sl8S/f2W+DtkdmiQCZYqKXFNtvXuE/LrPpHdqX1gQEujaPJupB Tw2w== 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 g185si8256738pgc.155.2018.04.22.07.49.43; Sun, 22 Apr 2018 07:49:57 -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 S932237AbeDVOQN (ORCPT + 99 others); Sun, 22 Apr 2018 10:16:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57276 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932209AbeDVOQJ (ORCPT ); Sun, 22 Apr 2018 10:16:09 -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 5B8664A5; Sun, 22 Apr 2018 14:16:08 +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.4 23/97] ubi: fastmap: Dont flush fastmap work on detach Date: Sun, 22 Apr 2018 15:53:01 +0200 Message-Id: <20180422135306.338619311@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@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.4-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 @@ -360,7 +360,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);