Hi Julien,

> On 22 May 2022, at 17:59, Julien Grall <[email protected]> wrote:
> 
> From: Julien Grall <[email protected]>
> 
> xsm_deasign_dtdevice() will indicate whether the caller is allowed
> to issue the operation. So the return value has to be checked.
> 
> Spotted by clang static analyzer.
> 
> Fixes: fe36cccc483c ("xen/passthrough: Extend XEN_DOMCTL_*assign_device to 
> support DT device")
> Signed-off-by: Julien Grall <[email protected]>

With the typo spotted by Michal solved (can be done on commit):
Reviewed-by: Bertrand Marquis <[email protected]>

Cheers
Bertrand

> 
> ---
> 
> Platform device-passthrough is not security supported. Hence why this is
> sent directly to xen-devel.
> ---
> xen/drivers/passthrough/device_tree.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/xen/drivers/passthrough/device_tree.c 
> b/xen/drivers/passthrough/device_tree.c
> index 98f2aa0dad68..1c32d7b50cce 100644
> --- a/xen/drivers/passthrough/device_tree.c
> +++ b/xen/drivers/passthrough/device_tree.c
> @@ -269,6 +269,8 @@ int iommu_do_dt_domctl(struct xen_domctl *domctl, struct 
> domain *d,
>             break;
> 
>         ret = xsm_deassign_dtdevice(XSM_HOOK, d, dt_node_full_name(dev));
> +        if ( ret )
> +            break;
> 
>         if ( d == dom_io )
>             return -EINVAL;
> -- 
> 2.32.0
> 
> 


Reply via email to