diff options
author | Richard Weinberger <richard@nod.at> | 2014-09-27 01:08:15 +0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-03-26 21:31:26 +0300 |
commit | 399a9feeac83c2f64138c438e41222a12dd71766 (patch) | |
tree | eefbdfbc60f05d0224f7c41924aff270665eca36 /drivers/mtd/ubi/wl.c | |
parent | 19371d73c9bd31a8e634ec5a80fc19fcd7714481 (diff) | |
download | linux-399a9feeac83c2f64138c438e41222a12dd71766.tar.xz |
UBI: Fastmap: Ensure that all fastmap work is done upon WL shutdown
...otherwise the deferred work might run after datastructures
got freed and corrupt memory.
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Guido MartÃnez <guido@vanguardiasur.com.ar>
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
-rw-r--r-- | drivers/mtd/ubi/wl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index ae174f4ed674..bf66890fefad 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -1856,6 +1856,9 @@ int ubi_thread(void *u) */ static void shutdown_work(struct ubi_device *ubi) { +#ifdef CONFIG_MTD_UBI_FASTMAP + flush_work(&ubi->fm_work); +#endif while (!list_empty(&ubi->works)) { struct ubi_work *wrk; |