2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00
linux-next/drivers/mtd/ubi
Artem Bityutskiy 01a4110d2b UBI: fix oops in error path
This patch fixes an oops in the error path of 'ubi_attach_mtd_dev()'. If
anything after 'uif_init()' fails, we get an oops in 'cancel_pending()'. The
reason is that 'uif_close()' drops the last reference count for 'ubi->dev' and
whole 'struct ubi_device' is freed. And then
'ubi_wl_close()'->'cancel_pending()' tries to access the 'ubi' pointer and
problems begin.

Note, in 'ubi_detach_mtd_dev()' function we get a device reference to
work-around this issue. Do the same in the error path of
'ubi_attach_mtd_dev()'.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-06-01 11:23:12 +03:00
..
build.c UBI: fix oops in error path 2011-06-01 11:23:12 +03:00
cdev.c UBI: fix minor stylistic issues 2011-04-14 11:34:41 +03:00
debug.c UBI: switch debugging tests knobs to debugfs 2011-06-01 11:23:12 +03:00
debug.h UBI: switch debugging tests knobs to debugfs 2011-06-01 11:23:12 +03:00
eba.c UBI: preserve corrupted PEBs 2010-10-19 17:19:57 +03:00
gluebi.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
io.c UBI: prepare debugging stuff to further debugfs conversion 2011-06-01 11:21:52 +03:00
kapi.c UBI: provide LEB offset information 2011-03-08 10:12:48 +02:00
Kconfig UBI: do not select KALLSYMS_ALL 2011-04-05 11:08:59 +03:00
Makefile UBI: make gluebi a separate module 2009-06-03 17:45:23 +03:00
misc.c UBI: make check_pattern function non-static 2010-10-19 17:19:57 +03:00
scan.c UBI: use debugfs for the extra checks knobs 2011-06-01 11:21:47 +03:00
scan.h UBI: add slab cache for ubi_scan_leb objects 2011-02-06 19:19:23 +02:00
ubi-media.h UBI: use __packed instead of __attribute__((packed)) 2011-04-14 11:34:41 +03:00
ubi.h UBI: make it possible to use struct ubi_device in debug.h 2011-06-01 11:21:52 +03:00
upd.c UBI: fix memory leak in update path 2010-01-18 18:53:56 +02:00
vmt.c UBI: use debugfs for the extra checks knobs 2011-06-01 11:21:47 +03:00
vtbl.c UBI: use debugfs for the extra checks knobs 2011-06-01 11:21:47 +03:00
wl.c UBI: prepare debugging stuff to further debugfs conversion 2011-06-01 11:21:52 +03:00