diff options
| author | Richard Weinberger <richard@nod.at> | 2014-09-26 17:08:15 -0400 |
|---|---|---|
| committer | Richard Weinberger <richard@nod.at> | 2015-03-26 14:31:26 -0400 |
| commit | 399a9feeac83c2f64138c438e41222a12dd71766 (patch) | |
| tree | eefbdfbc60f05d0224f7c41924aff270665eca36 /drivers/mtd/ubi | |
| parent | 19371d73c9bd31a8e634ec5a80fc19fcd7714481 (diff) | |
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')
| -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) | |||
| 1856 | */ | 1856 | */ |
| 1857 | static void shutdown_work(struct ubi_device *ubi) | 1857 | static void shutdown_work(struct ubi_device *ubi) |
| 1858 | { | 1858 | { |
| 1859 | #ifdef CONFIG_MTD_UBI_FASTMAP | ||
| 1860 | flush_work(&ubi->fm_work); | ||
| 1861 | #endif | ||
| 1859 | while (!list_empty(&ubi->works)) { | 1862 | while (!list_empty(&ubi->works)) { |
| 1860 | struct ubi_work *wrk; | 1863 | struct ubi_work *wrk; |
| 1861 | 1864 | ||
