linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Han Xu <han.xu@nxp.com>
To: Richard Weinberger <richard@nod.at>, Han Xu <xhnjupt@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: RE: [EXT] Re: 5.2.0-rc1 UBIFS bad unlock balance
Date: Tue, 13 Aug 2019 19:59:25 +0000	[thread overview]
Message-ID: <AM0PR04MB496181557F0D6EDC53783AAD97D20@AM0PR04MB4961.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <1755548283.65333.1565725690268.JavaMail.zimbra@nod.at>



> -----Original Message-----
> From: Richard Weinberger <richard@nod.at>
> Sent: Tuesday, August 13, 2019 2:48 PM
> To: Han Xu <xhnjupt@gmail.com>
> Cc: Han Xu <han.xu@nxp.com>; linux-mtd <linux-mtd@lists.infradead.org>
> 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@nod.at>
> > 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/

      reply	other threads:[~2019-08-13 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 20:21 5.2.0-rc1 UBIFS bad unlock balance Han Xu
2019-06-04 20:59 ` Richard Weinberger
2019-08-12 19:40   ` Han Xu
2019-08-12 19:55     ` Richard Weinberger
2019-08-13 19:33       ` Han Xu
2019-08-13 19:48         ` Richard Weinberger
2019-08-13 19:59           ` Han Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR04MB496181557F0D6EDC53783AAD97D20@AM0PR04MB4961.eurprd04.prod.outlook.com \
    --to=han.xu@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=xhnjupt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).