UBI leb_write_unlock NULL pointer Oops (continuation)

Bill Pringlemeir bpringlemeir at nbsps.com
Wed Mar 5 16:42:12 EST 2014


On  5 Mar 2014, bpringlemeir at nbsps.com wrote:

> On  5 Mar 2014, richard at nod.at wrote:

>> The solution is rather trivial.

[snip]

> Still, the logic of ubi_eba_copy_leb() seems really weird to me.  I
> don't understand,

> It looks like a double reference count decrement.  Maybe they operate on
> different ltree nodes, but then the locks mis-match.

	if (down_write_trylock(&le->mutex))
		return 0;

Ah, I mis-understood.  The path where the lock is taken doesn't
decrement the 'users' count; I was thinking of '0' as fail.

Regards,
Bill Pringlemeir.



More information about the linux-mtd mailing list