kexec/arch/ppc/fixup_dtb.c: Calcuate new FDT size correctly
Subsystems (2)
PATCH 1/1 kexec/arch/ppc/fixup_dtb.c: Calcuate new FDT size correctly
It was possible to not add enough space when we allocate more space for more memory reserve regions, this was because we were incorrectly accounting for the size of a reserve region. This corrects the assumed size for a resize region
Signed-off-by Matthew McClintock <[email protected]>
--- kexec/arch/ppc/fixup_dtb.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
kexec/arch/ppc/fixup_dtb.c +2 -1
@@ -354,7 +354,8 @@ char *fixup_dtb_init(struct kexec_info *info, char *blob_buf, off_t *blob_size,printf ("%s: Unable to pack flat device tree\n" ,fdt_strerror (ret));/* info->nr_segments just a guide, will grow by at least EXPAND_GRANULARITY */ - blob_buf =expand_buf (info->nr_segments, blob_buf, blob_size); + blob_buf =expand_buf (info->nr_segments *sizeof (struct fdt_reserve_entry ), + blob_buf, blob_size);/* add reserve region for *THIS* fdt */ *dtb_addr = locate_hole(info, *blob_size, 0,
Signature · 8 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedQuoted 6 lines · Matthew McClintock
It was possible to not add enough space when we allocate more space for more memory reserve regions, this was because we were incorrectly accounting for the size of a reserve region. This corrects the assumed size for a resize region
Signed-off-by Matthew McClintock <[email protected]>
Thanks, applied.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec