public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ubifs: avoid memory corruption during ubifsmount
Date: Mon, 25 Jun 2018 22:47:28 +0200	[thread overview]
Message-ID: <1770221.hggCJ2Af2R@blindfold> (raw)
In-Reply-To: <1529927652-29344-1-git-send-email-patrice.chotard@st.com>

Patrice,

Am Montag, 25. Juni 2018, 13:54:12 CEST schrieb Patrice Chotard:
> Sometimes, at boot time, following issue appears:
> Error reading superblock on volume 'ubi0:boot' errno=-22!
> 
> This error is coming from wrong ubi_num and wrong ubi_id in the superblock.
> (ubi_num = -1 and vol_id = -1).
> It appears that following line in sget function:
> hlist_add_head(&s->s_instances, &type->fs_supers);
> corrupts the superblock structure.

Hmm, how can hlist_add_head() corrupt the structure?
This seems fishy to me, I fear that this is not the root cause of the problem
you are facing.

> By checking ubifs source code, s_instances parameter is not used anymore.
> So, by setting this parameter and the associated source code under
> __UBOOT__ compilation switch solves this issue.

Yes, we can clean up this. But as I said, we need to dig deeper to explain
the corruption you see.

Thanks,
//richard

  reply	other threads:[~2018-06-25 20:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 11:54 [U-Boot] [PATCH] ubifs: avoid memory corruption during ubifsmount Patrice Chotard
2018-06-25 20:47 ` Richard Weinberger [this message]
2018-06-26 13:01   ` Patrice CHOTARD
2018-06-26 13:18     ` Richard Weinberger
  -- strict thread matches above, loose matches on Subject: below --
2018-06-11 13:22 Patrice Chotard

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=1770221.hggCJ2Af2R@blindfold \
    --to=richard@nod.at \
    --cc=u-boot@lists.denx.de \
    /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