Skip to contentSkip to conversation

UBIFS: Missing offset relocation for compressor 'none'

PATCH New Michael Lawnick 1 participant 2 messages Mar 19, 2009 UBI file system (UBIFS)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBIFS: Missing offset relocation for compressor 'none'

On systems where U-Boot is linked to another address than it really lays (e.g. backup image), calls via function pointers must be fixed with a '+= gd->reloc_off'.
This was not done for none_compr in ubifs_compressors_init() what leads to system crash on ubifsmount command.

---
 fs/ubifs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ubifs/ubifs.c 2009-03-18 16:06:09.000000000 +0100 renamed from fs/ubifs/ubifs.c 2009-02-20 16:02:44.434443000 +0100 +0 -0
diff -Naur a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c

@@ -147,7 +147,7 @@ int __init ubifs_compressors_init(void)

        if (err)
                return err;

- ubifs_compressors[UBIFS_COMPR_NONE] = &none_compr;

+       ubifs_compressors[UBIFS_COMPR_NONE] = compr_init(&none_compr);
        return 0;

}
--
Kind regards,
Michael

#1 lore raw

PATCH 1/1 UBIFS: Missing offset relocation for compressor 'none'

Michael Lawnick said the following:

Quoted 8 lines

On systems where U-Boot is linked to another address than it really lays (e.g. backup image), calls via function pointers must be fixed with a '+= gd->reloc_off'.
This was not done for none_compr in ubifs_compressors_init() what leads to system crash on ubifsmount command.

---

What now followed is rubbish and works by chance. Please ignore, correct patch in a few hours.

Sorry :-(

Signature · 2 lines
Regards,
Michael