[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 10/10] x86: check hvm domain before calling pt_irq_destroy_bind
... just like its counter part because that function is HVM only. There is no risk of corruption because pt_irq_destroy_bind already has proper check in place, but it would be nice to be more explicit before calling the said function. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/domctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 8fbbf3aeb3..07b7d41b66 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -707,6 +707,10 @@ long arch_do_domctl( struct xen_domctl_bind_pt_irq *bind = &domctl->u.bind_pt_irq; int irq = domain_pirq_to_irq(d, bind->machine_irq); + ret = -EINVAL; + if ( !is_hvm_domain(d) ) + break; + ret = -EPERM; if ( irq <= 0 || !irq_access_permitted(currd, irq) ) break; -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |