[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/IRQs: correct/tighten vector check in _clear_irq_vector()
commit c6b0dad9345ee6935170cd39a28f0cfdcd7c5b91 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Mon Jul 22 11:45:28 2019 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Jul 22 11:45:28 2019 +0200 x86/IRQs: correct/tighten vector check in _clear_irq_vector() If any particular value was to be checked against, it would need to be IRQ_VECTOR_UNASSIGNED. Reported-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Be more strict though and use valid_irq_vector() instead. Take the opportunity and also convert local variables to unsigned int. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 732ddd4efd..f5e31a1c9b 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -283,14 +283,13 @@ void destroy_irq(unsigned int irq) static void _clear_irq_vector(struct irq_desc *desc) { - unsigned int cpu; - int vector, old_vector, irq = desc->irq; + unsigned int cpu, old_vector, irq = desc->irq; + unsigned int vector = desc->arch.vector; cpumask_t tmp_mask; - BUG_ON(!desc->arch.vector); + BUG_ON(!valid_irq_vector(vector)); /* Always clear desc->arch.vector */ - vector = desc->arch.vector; cpumask_and(&tmp_mask, desc->arch.cpu_mask, &cpu_online_map); for_each_cpu(cpu, &tmp_mask) { -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |