ubi: Ensure no fastmap flush after uif_close
PATCH v2 1/1 ubi: Ensure no fastmap flush after uif_close
On detach UBI attempts to update fastmap after closing user interfaces but at this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures.
---
Changes for v2:
- Fix by removing update to fastmap from ubi_fastmap_close instead of reordering uif_close and ubi_wl_close in ubi_detach_mtd_dev
drivers/mtd/ubi/fastmap-wl.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/mtd/ubi/fastmap-wl.c +0 -5
@@ -337,11 +337,6 @@ static void ubi_fastmap_close(struct ubi_device *ubi) {int i; -#ifndef __UBOOT__ -flush_work (&ubi->fm_work); -#else -update_fastmap_work_fn (ubi); -#endif return_unused_pool_pebs (ubi, &ubi->fm_pool);return_unused_pool_pebs (ubi, &ubi->fm_wl_pool);
Signature · 1 line
2.7.4
PATCH v2 1/1 ubi: Ensure no fastmap flush after uif_close
Hello Martin,
Am 18.01.2018 um 09:07 schrieb Martin Townsend:
Quoted 8 lines
On detach UBI attempts to update fastmap after closing user interfaces but at this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures.
Signed-off-by Martin Townsend <[email protected]>Cc hs at denx.deCc kmpark at infradead.orgCc richard at sigma-star.at
Quoted 7 lines
---
Changes for v2:
- Fix by removing update to fastmap fromubi_fastmap_closeinstead of reorderinguif_closeandubi_wl_closeinubi_detach_mtd_devdrivers/mtd/ubi/fastmap-wl.c | 5 ----- 1 file changed, 5 deletions(-)
Applied to u-boot-ubi master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de