linux/drivers/mtd/ubi
Richard Weinberger 8fb2a51478 UBI: Fastmap: Fix race after ubi_wl_get_peb()
ubi_wl_get_peb() returns a fresh PEB which can be used by
user of UBI. Due to the pool logic fastmap will correctly
map this PEB upon attach time because it will be scanned.

If a new fastmap is written (due to heavy parallel io)
while the before the fresh PEB is assigned to the EBA table
it will not be scanned as it is no longer in the pool.
So, the race window exists between ubi_wl_get_peb()
and the EBA table assignment.
We have to make sure that no new fastmap can be written
while that.

To ensure that ubi_wl_get_peb() will grab ubi->fm_sem in read mode
and the user of ubi_wl_get_peb() has to release it after the PEB
got assigned.

Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26 22:46:01 +01:00
..
attach.c UBI: Remove alloc_ai() slab name from parameter list 2015-03-26 22:45:57 +01:00
block.c UBI: block: Fix checking for NULL instead of IS_ERR() 2015-02-12 23:33:32 +01:00
build.c UBI: Fastmap: Make WL pool size 50% of user pool size 2015-03-26 22:46:00 +01:00
cdev.c UBI: fix check for "too many bytes" 2015-03-26 12:07:18 +01:00
debug.c UBI: Extend UBI layer debug/messaging capabilities 2014-11-07 12:08:51 +02:00
debug.h mtd: rename random32() to prandom_u32() 2013-02-04 09:26:28 +02:00
eba.c UBI: Fastmap: Fix race after ubi_wl_get_peb() 2015-03-26 22:46:01 +01:00
fastmap.c UBI: Fastmap: Fix leb_count unbalance 2015-03-26 22:46:00 +01:00
gluebi.c UBI: gluebi: rename misleading variables 2012-11-30 13:54:41 +02:00
io.c UBI: extend UBI layer debug/messaging capabilities - cosmetics 2015-01-28 16:09:09 +01:00
kapi.c UBI: Add initial support for scatter gather 2015-01-28 16:04:26 +01:00
Kconfig UBI: block: Add CONFIG_BLOCK dependency 2014-03-04 14:49:53 +02:00
Makefile UBI: R/O block driver on top of UBI volumes 2014-02-28 16:29:48 +02:00
misc.c UBI: fix soft lockup in ubi_check_volume() 2015-01-28 16:18:09 +01:00
ubi-media.h UBI: Fastmap: Make WL pool size 50% of user pool size 2015-03-26 22:46:00 +01:00
ubi.h UBI: Fastmap: Wrap fastmap specific function in a ifdef 2015-03-26 22:45:56 +01:00
upd.c UBI: Fix invalid vfree() 2014-11-07 15:14:09 +02:00
vmt.c UBI: Extend UBI layer debug/messaging capabilities 2014-11-07 12:08:51 +02:00
vtbl.c UBI: extend UBI layer debug/messaging capabilities - cosmetics 2015-01-28 16:09:09 +01:00
wl.c UBI: Fastmap: Fix race after ubi_wl_get_peb() 2015-03-26 22:46:01 +01:00