diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-01-21 12:40:28 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-01-21 12:40:28 +0000 |
commit | 313140cbb12019660e435dfbb4f2886df269830c (patch) | |
tree | 7a51e34db8f32546cef949c4497562bb2ab891fb /xen/common/device_tree.c | |
parent | c2da1a98f4aabaa6064304ae88830d196b0c3b1c (diff) | |
download | xen-313140cbb12019660e435dfbb4f2886df269830c.tar.gz xen-313140cbb12019660e435dfbb4f2886df269830c.tar.bz2 xen-313140cbb12019660e435dfbb4f2886df269830c.zip |
device-tree: get_val cannot cope with cells > 2, add early_panic
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common/device_tree.c')
-rw-r--r-- | xen/common/device_tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 8b4ef2f45c..260c2d4862 100644 --- 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; |