[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/arm: Check return code from recursive calls to scan_pfdt_node()
commit f51c92383b8dc76233481e2814aa2e905fb9b501 Author: Michal Orzel <michal.orzel@xxxxxxx> AuthorDate: Mon Oct 16 14:45:59 2023 +0200 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Tue Oct 17 14:01:03 2023 -0700 xen/arm: Check return code from recursive calls to scan_pfdt_node() At the moment, we do not check a return code from scan_pfdt_node() called recursively. This means that any issue that may occur while parsing and copying the passthrough nodes is hidden and Xen continues to boot a domain despite errors. This may lead to incorrect device tree generation and various guest issues (e.g. trap on attempt to access MMIO not mapped in P2M). Fix it. Fixes: 669ecdf8d6cd ("xen/arm: copy dtb fragment to guest dtb") Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx> --- xen/arch/arm/domain_build.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 24c9019cc4..49792dd590 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2872,8 +2872,11 @@ static int __init scan_pfdt_node(struct kernel_info *kinfo, const void *pfdt, node_next = fdt_first_subnode(pfdt, nodeoff); while ( node_next > 0 ) { - scan_pfdt_node(kinfo, pfdt, node_next, address_cells, size_cells, - scan_passthrough_prop); + rc = scan_pfdt_node(kinfo, pfdt, node_next, address_cells, size_cells, + scan_passthrough_prop); + if ( rc ) + return rc; + node_next = fdt_next_subnode(pfdt, node_next); } -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |