Commit fa4d84e6 authored by Jan Beulich's avatar Jan Beulich

IOMMU: make domctl handler tolerate NULL domain

Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX,
XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed
here, when the domctl was passed DOMID_INVALID.

Fixes: 71e617a6 ("use is_iommu_enabled() where appropriate...")
Reported-by: default avatarCheyenne Wills <>
Signed-off-by: default avatarJan Beulich <>
Reviewed-by: default avatarPaul Durrant <>
Reviewed-by: default avatarJuergen Gross <>
parent 9cd7e31b
......@@ -568,7 +568,7 @@ int iommu_do_domctl(
int ret = -ENODEV;
if ( !is_iommu_enabled(d) )
if ( !(d ? is_iommu_enabled(d) : iommu_enabled) )
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment