2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00
linux-next/drivers/mtd/ubi
Richard Weinberger d59f21bebe UBI: Fastmap: Fix races in ubi_wl_get_peb()
ubi_wl_get_peb() has two problems, it reads the pool
size and usage counters without any protection.
While reading one value would be perfectly fine it reads multiple
values and compares them. This is racy and can lead to incorrect
pool handling.
Furthermore ubi_update_fastmap() is called without wl_lock held,
before incrementing the used counter it needs to be checked again.
It could happen that another thread consumed all PEBs from the
pool and the counter goes beyond ->size.

Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26 21:24:24 +01:00
..
attach.c UBI: account for bitflips in both the VID header and data 2015-03-26 12:07:17 +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: extend UBI layer debug/messaging capabilities - cosmetics 2015-01-28 16:09:09 +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: fix out of bounds write 2015-03-26 12:07:17 +01:00
fastmap.c UBI: Fastmap: Care about the protection queue 2015-01-28 16:09:45 +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: Add fastmap on-flash data structures 2012-10-03 12:29:37 +03:00
ubi.h UBI: Fastmap: Fix races in ubi_wl_get_peb() 2015-03-26 21:24:24 +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 races in ubi_wl_get_peb() 2015-03-26 21:24:24 +01:00