android_kernel_sony_sdm845/drivers/mtd/ubi
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dan Carpenter 03c2579220 ubi: Fix an error pointer dereference in error handling code
commit 5d3805af279c93ef49a64701f35254676d709622 upstream.

If "seen_pebs = init_seen(ubi);" fails then "seen_pebs" is an error pointer
and we try to kfree() it which results in an Oops.

This patch re-arranges the error handling so now it only frees things
which have been allocated successfully.

Fixes: daef3dd1f0 ("UBI: Fastmap: Add self check to detect absent PEBs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-14 16:31:06 -05:00
..
attach.c
block.c ubi: Fix error for write access 2018-04-24 09:34:09 +02:00
build.c ubi: Put MTD device after it is not used 2019-12-05 15:34:22 +01:00
cdev.c
debug.c
debug.h
eba.c ubi: fastmap: Correctly handle interrupted erasures in EBA 2018-07-03 11:23:14 +02:00
fastmap-wl.c ubi: fastmap: Don't flush fastmap work on detach 2018-04-24 09:34:09 +02:00
fastmap.c ubi: Fix an error pointer dereference in error handling code 2020-02-14 16:31:06 -05:00
gluebi.c
io.c
kapi.c ubi: Do not drop UBI device reference before using 2019-12-05 15:34:23 +01:00
Kconfig
Makefile
misc.c
ubi-media.h
ubi.h
upd.c
vmt.c ubi: Fix race condition between ubi volume creation and udev 2018-03-18 11:18:54 +01:00
vtbl.c
wl.c mtd: ubi: wl: Fix error return code in ubi_wl_init() 2018-09-19 22:47:16 +02:00
wl.h