diff options
author | Liu Hua <sdu.liu@huawei.com> | 2014-07-23 19:20:34 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-07-24 17:11:22 +0900 |
commit | 943ba35f8143408d8ada9a24d0986663cc612df9 (patch) | |
tree | 4f1ef6282d28fd6ffd0037f208b08e0afff116e7 /kexec/arch/arm | |
parent | 335bad77fb0750f3961aa8df47c83a522d212b08 (diff) |
kexec: align the extended size of dtb
When loading dtb on arm platform, we may need change strings in dtb
in function setup_dtb_prop. If length of new string is larger than that
of the old one. We should extend the dtb by "FDT_TAGALIGN"ed size.
If not, kexec may fail to load the capture kernel.
Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/arm')
-rw-r--r-- | kexec/arch/arm/kexec-zImage-arm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c index 44b87bb..ff4e38d 100644 --- a/kexec/arch/arm/kexec-zImage-arm.c +++ b/kexec/arch/arm/kexec-zImage-arm.c @@ -259,7 +259,7 @@ static int setup_dtb_prop(char **bufp, off_t *sizep, const char *node_name, dtb_size += fdt_prop_len(prop_name, len); } else { if (prop_len < len) - dtb_size += len - prop_len; + dtb_size += FDT_TAGALIGN(len - prop_len); } if (fdt_totalsize(dtb_buf) < dtb_size) { |