projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2da1a9
)
device-tree: get_val cannot cope with cells > 2, add early_panic
author
Ian Campbell
<ian.campbell@citrix.com>
Mon, 21 Jan 2013 12:40:28 +0000
(12:40 +0000)
committer
Ian Campbell
<ian.campbell@citrix.com>
Mon, 21 Jan 2013 12:40:28 +0000
(12:40 +0000)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/common/device_tree.c
patch
|
blob
|
history
diff --git
a/xen/common/device_tree.c
b/xen/common/device_tree.c
index 8b4ef2f45c67839341dbc80b8d9ab612f6cb2d38..260c2d486248e65985cb7c37eb5f98a9dbdd608c 100644
(file)
--- a/
xen/common/device_tree.c
+++ b/
xen/common/device_tree.c
@@
-84,6
+84,9
@@
static void __init get_val(const u32 **cell, u32 cells, u64 *val)
{
*val = 0;
+ if ( cells > 2 )
+ early_panic("dtb value contains > 2 cells\n");
+
while ( cells-- )
{
*val <<= 32;