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

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