[U-Boot] [PATCH] ubifs: avoid memory corruption during ubifsmount
Patrice CHOTARD
patrice.chotard at st.com
Tue Jun 26 13:01:14 UTC 2018
Hi Richard
On 06/25/2018 10:47 PM, Richard Weinberger wrote:
> 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.
Following your remark, Christophe and i relaunched our test setup to go
deeper in the analysis of the issue we saw. Unfortunately we can't
reproduced it. We have now some doubt.
>
>> 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.
Nevertheless, do you think it's useful to clean this code and submit a
new patch with clean-up purpose only ?
Patrice
>
> Thanks,
> //richard
>
More information about the U-Boot
mailing list