RE: [EXT] Re: 5.2.0-rc1 UBIFS bad unlock balance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Richard Weinberger <richard@xxxxxx>
> Sent: Tuesday, August 13, 2019 2:48 PM
> To: Han Xu <xhnjupt@xxxxxxxxx>
> Cc: Han Xu <han.xu@xxxxxxx>; linux-mtd <linux-mtd@xxxxxxxxxxxxxxxxxxx>
> Subject: [EXT] Re: 5.2.0-rc1 UBIFS bad unlock balance
> 
> Caution: EXT Email
> 
> ----- Ursprüngliche Mail -----
> >> Huh? The bad commit was dropped. Are you still seeing this on Linus' tree?
> >> Maybe something else is bad.
> >>
> >
> > Should be related to this commit. Seems working fine after reverting the patch.
> >
> > commit 8009ce956c3d28022af6b122e50213ad830fc902
> > Author: Richard Weinberger <richard@xxxxxx>
> > Date:   Wed May 15 21:52:34 2019 +0200
> >
> >    ubifs: Don't leak orphans on memory during commit
> 
> You are perfectly right, there is still a problem!
> Does the following patch make the problem go away?
> After orphan_delete() c->orphan_lock is being unlocked, so a double unlock can
> happen.
> 
> diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c index
> b52624e28fa1..3b4b4114f208 100644
> --- a/fs/ubifs/orphan.c
> +++ b/fs/ubifs/orphan.c
> @@ -129,7 +129,6 @@ static void __orphan_drop(struct ubifs_info *c, struct
> ubifs_orphan *o)  static void orphan_delete(struct ubifs_info *c, struct
> ubifs_orphan *orph)  {
>         if (orph->del) {
> -               spin_unlock(&c->orphan_lock);
>                 dbg_gen("deleted twice ino %lu", orph->inum);
>                 return;
>         }
> @@ -138,7 +137,6 @@ static void orphan_delete(struct ubifs_info *c, struct
> ubifs_orphan *orph)
>                 orph->del = 1;
>                 orph->dnext = c->orph_dnext;
>                 c->orph_dnext = orph;
> -               spin_unlock(&c->orphan_lock);
>                 dbg_gen("delete later ino %lu", orph->inum);
>                 return;
>         }
> 

Yes, works fine now. Thanks.

> Thanks,
> //richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux