mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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>
This commit is contained in:
parent
19371d73c9
commit
399a9feeac
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue