brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0189-scripts-dtc-Fix-UMR-causing-corrupt-dtbo-overlay-fil.patch
1 From c12c80f4a33ca959cb0a62c6284bbc27cdce0b48 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
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
10 Fix this by initializing local_fixup_generated to false.
11
12 Signed-off-by: Matthias Reichl <hias@horus.com>
13 ---
14 scripts/dtc/checks.c | 1 +
15 1 file changed, 1 insertion(+)
16
17 --- a/scripts/dtc/checks.c
18 +++ b/scripts/dtc/checks.c
19 @@ -523,6 +523,7 @@ static void fixup_phandle_references(str
20 fe->prop = prop;
21 fe->offset = m->offset;
22 fe->next = NULL;
23 + fe->local_fixup_generated = false;
24
25 /* append it to the local fixups */
26 fep = &dt->local_fixups;