Skip to content
Commit 2e8f08de authored by Richard Weinberger's avatar Richard Weinberger
Browse files

ubi: Fix races around ubi_refill_pools()

When writing a new Fastmap the first thing that happens
is refilling the pools in memory.
At this stage it is possible that new PEBs from the new pools
get already claimed and written with data.
If this happens before the new Fastmap data structure hits the
flash and we face power cut the freshly written PEB will not
scanned and unnoticed.

Solve the issue by locking the pools until Fastmap is written.

Cc: <stable@vger.kernel.org>
Fixes: dbb7d2a8

 ("UBI: Add fastmap core")
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 23654188
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment