kernel_optimize_test/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
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
Kconfig UBI: do not select KALLSYMS_ALL 2011-04-05 11:08:59 +03:00
Makefile
misc.c
scan.c UBI: use debugfs for the extra checks knobs 2011-06-01 11:21:47 +03:00
scan.h
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
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