From: Michal Orzel Date: Mon, 3 Mar 2025 08:56:47 +0000 (+0100) Subject: xen/arm: dm: Bail out if padding != 0 for XEN_DMOP_set_irq_level X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c29e5a16cb9c5331207edac5a8d495e7b22d6214;p=xen.git xen/arm: dm: Bail out if padding != 0 for XEN_DMOP_set_irq_level XEN_DMOP_set_irq_level operation requires elements of pad array (being member of xen_dm_op_set_irq_level structure) to be 0. While handling the hypercall we validate this. If one of the elements is not zero, we set rc to -EINVAL. At this point we should stop further DM handling and bail out propagating the error to the caller. However, instead of goto the code uses break which has basically no meaningful effect. The rc value is never read and the code continues with the hypercall processing ending up (possibly) with the interrupt injection. Fix it. Fixes: 5d752df85f2c ("xen/dm: Introduce xendevicemodel_set_irq_level DM op") Signed-off-by: Michal Orzel Reviewed-by: Bertrand Marquis --- diff --git a/xen/arch/arm/dm.c b/xen/arch/arm/dm.c index 773a0a2592..fdb3d967ec 100644 --- a/xen/arch/arm/dm.c +++ b/xen/arch/arm/dm.c @@ -93,7 +93,7 @@ int dm_op(const struct dmop_args *op_args) if ( data->pad[i] ) { rc = -EINVAL; - break; + goto out; } }