Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640874
| From | Sascha Silbe <x-linux@infra-silbe.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] of: fdt: fix unflattening of FDTs containing uncompressed paths |
| Date | 2017-05-13 12:40 +0200 |
| Message-ID | <tGCCS-2pX-17@gated-at.bofh.it> (permalink) |
| References | <tGCCR-2pX-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Probably since commit dfbd4c6eff35 ("drivers/of: Split
unflatten_dt_node()"), unflattening an FDT containing uncompressed
node names (e.g. "/gpio@d4019000/gpio@0") will abort after scanning
the root node because fpsize wasn't updated to include the path len.
Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
---
drivers/of/fdt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index e5ce4b59e162..2d5414e644b3 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -309,6 +309,8 @@ static unsigned int populate_node(const void *blob,
fpsize += l;
allocl = fpsize;
}
+ } else {
+ fpsize += allocl;
}
np = unflatten_dt_alloc(mem, sizeof(struct device_node) + allocl,
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] FDT fixes for running on native Open Firmware Sascha Silbe <x-linux@infra-silbe.de> - 2017-05-13 12:40 +0200 [PATCH 2/2] of: fdt: fix unflattening of FDTs containing uncompressed paths Sascha Silbe <x-linux@infra-silbe.de> - 2017-05-13 12:40 +0200
csiph-web