AW: UBI leb_write_unlock NULL pointer Oops (continuation)

Submitted by Wiedemer, Thorsten (Lawo AG) on Feb. 4, 2014, 5:52 p.m.

Details

Message ID D7B1B5F4F3F27A4CB073BF422331203F2A18A7474B@Exchange1.lawo.de
State RFC
Headers show

Commit Message

Wiedemer, Thorsten (Lawo AG) Feb. 4, 2014, 5:52 p.m.
Ehmm, OK, OK, even with the changes in kernel, ubi_assert() in leb_write_unlock() wouldn't have triggered ...

Thorsten

Patch hide | download patch | download mbox

diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 0e11671d..48fd2aa 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -301,6 +301,7 @@  static void leb_write_unlock(struct ubi_device *ubi, int vol_id, int lnum)

        spin_lock(&ubi->ltree_lock);
        le = ltree_lookup(ubi, vol_id, lnum);
+       ubi_assert(le);
        le->users -= 1;
        ubi_assert(le->users >= 0);
        up_write(&le->mutex);