]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:47:50 +0000 (11:47 -0400)
BugLink: http://bugs.launchpad.net/bugs/1773233
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 <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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mtd/ubi/fastmap-wl.c

index 4f0bd6b4422adc9bfa5c7bfd4f1afdd8abcdb4fc..69dd21679a30c21fcb58779f83098034747d4037 100644 (file)
@@ -362,7 +362,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);