Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
xen.18778
602cfe3d-IOMMU-check-if-initialized-before-tear...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 602cfe3d-IOMMU-check-if-initialized-before-teardown.patch of Package xen.18778
# Commit d670ef3401b91d04c58d72cd8ce5579b4fa900d8 # Date 2021-02-17 11:30:05 +0000 # Author Julien Grall <jgrall@amazon.com> # Committer Julien Grall <jgrall@amazon.com> xen/iommu: Check if the IOMMU was initialized before tearing down is_iommu_enabled() will return true even if the IOMMU has not been initialized (e.g. the ops are not set). In the case of an early failure in arch_domain_init(), the function iommu_destroy_domain() will be called even if the IOMMU is not initialized. This will result to dereference the ops which will be NULL and an host crash. Fix the issue by checking that ops has been set before accessing it. Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appropriate...") Signed-off-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Paul Durrant <paul@xen.org> --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -228,6 +228,13 @@ static void iommu_teardown(struct domain { struct domain_iommu *hd = dom_iommu(d); + /* + * During early domain creation failure, we may reach here with the + * ops not yet initialized. + */ + if ( !hd->platform_ops ) + return; + hd->platform_ops->teardown(d); tasklet_schedule(&iommu_pt_cleanup_tasklet); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor