mtd: ubi: Max out wear-leveling threshold
Due to the recursive ubi_thread implementation in the barebox, a large
amount of wear-leveling can lead to a stack overflow.

This was observed during extensive ubi stress tests with the linux
kernel and periodic power cycles. We found that if the wear-leveling
threshold is exceeded and a large amount of erase blocks need
wear-leveling the stack can overflow.

The hardware used to observe this was a phyCORE-i.MX 6 with 1GB NAND flash.

As the kernel is perfectly capable of handling wear-leveling we can
disable wear-leveling in the barebox by maxing out the threshold and
removing its Kconfig option.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 0037375 commit d1210dc63f38e7e6d8147b44b3f6f9518c099306
@Stefan Riedmueller Stefan Riedmueller authored on 20 Sep 2019
Sascha Hauer committed on 14 Oct 2019
Showing 4 changed files
View
drivers/mtd/ubi/Kconfig
View
drivers/mtd/ubi/build.c
View
drivers/mtd/ubi/ubi.h
View
drivers/mtd/ubi/wl.c