0189-scripts-dtc-Fix-UMR-causing-corrupt-dtbo-overlay-fil.patch 840 B

123456789101112131415161718192021222324252627
  1. From e3a356dd422147d4d96aa0c9378551363b1a5b99 Mon Sep 17 00:00:00 2001
  2. From: Matthias Reichl <hias@horus.com>
  3. Date: Tue, 15 Mar 2016 21:13:39 +0100
  4. Subject: [PATCH 189/381] scripts/dtc: Fix UMR causing corrupt dtbo overlay
  5. files
  6. struct fixup_entry is allocated from the heap but it's member
  7. local_fixup_generated was never initialized. This lead to
  8. corrupted dtbo files.
  9. Fix this by initializing local_fixup_generated to false.
  10. Signed-off-by: Matthias Reichl <hias@horus.com>
  11. ---
  12. scripts/dtc/checks.c | 1 +
  13. 1 file changed, 1 insertion(+)
  14. --- a/scripts/dtc/checks.c
  15. +++ b/scripts/dtc/checks.c
  16. @@ -523,6 +523,7 @@ static void fixup_phandle_references(str
  17. fe->prop = prop;
  18. fe->offset = m->offset;
  19. fe->next = NULL;
  20. + fe->local_fixup_generated = false;
  21. /* append it to the local fixups */
  22. fep = &dt->local_fixups;