[U-Boot] [PATCH] ubifs: avoid memory corruption during ubifsmount
Richard Weinberger
richard at nod.at
Mon Jun 25 20:47:28 UTC 2018
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
More information about the U-Boot
mailing list