]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ubi: fastmap: Don't flush fastmap work on detach
authorRichard Weinberger <richard@nod.at>
Wed, 17 Jan 2018 22:15:57 +0000 (23:15 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:32 +0000 (21:36 -0400)
[ Upstream commit 29b7a6fa1ec07e8480b0d9caf635a4498a438bf4 ]

At this point UBI volumes have already been free()'ed and fastmap can no
longer access these data structures.

Reported-by: Martin Townsend <mtownsend1973@gmail.com>
Fixes: 74cdaf24004a ("UBI: Fastmap: Fix memory leaks while closing the WL sub-system")
Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/mtd/ubi/fastmap-wl.c

index b2a665398bcaf41225f6a9cbe858e8df209c3b89..4c1d12bacfd09a5d84395bedf4ecc471534d2988 100644 (file)
@@ -331,7 +331,6 @@ static void ubi_fastmap_close(struct ubi_device *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);