[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 13/16] device-tree: get_val cannot cope with cells > 2, add a BUG
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/common/device_tree.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 226e3f3..60f3a03 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -45,6 +45,8 @@ static void __init get_val(const u32 **cell, u32 cells, u64 *val) { *val = 0; + BUG_ON( cells > 2 ); + while ( cells-- ) { *val <<= 32; @@ -139,7 +141,7 @@ int device_tree_for_each_node(const void *fdt, */ const char *device_tree_bootargs(const void *fdt) { - int node; + int node; const struct fdt_property *prop; node = fdt_path_offset(fdt, "/chosen"); -- 1.7.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |