UBI leb_write_unlock NULL pointer Oops (continuation)

Richard Weinberger richard at nod.at
Wed Mar 5 18:11:45 EST 2014


Am 05.03.2014 22:42, schrieb Bill Pringlemeir:
> 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.

Welcome to UNIX where 0 is success. :-)

Thanks,
//richard



More information about the linux-mtd mailing list