From: Roger Pau Monné Date: Thu, 5 Jul 2018 13:42:59 +0000 (+0200) Subject: x86/vpt: fix create_periodic_time to check the irq parameter X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3678 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=74bd6429407c388a9b0add410dba7aa9f37b9440;p=xen.git x86/vpt: fix create_periodic_time to check the irq parameter Instead of the stale value inside the periodic_time struct. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index d5363caec7..a0cc61fd28 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -445,8 +445,8 @@ void create_periodic_time( uint64_t period, uint8_t irq, time_cb *cb, void *data) { if ( !pt->source || - (pt->irq >= NR_ISAIRQS && pt->source == PTSRC_isa) || - (pt->irq >= hvm_domain_irq(v->domain)->nr_gsis && + (irq >= NR_ISAIRQS && pt->source == PTSRC_isa) || + (irq >= hvm_domain_irq(v->domain)->nr_gsis && pt->source == PTSRC_ioapic) ) { ASSERT_UNREACHABLE();