[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] arm: Coverity 1469342 correct find_*_bit() functions use
vgic_vcpu_pending_irq() uses find_next_bit() library function with single 'unsigned long' variable, while it is designed to work with memory regions. Nothing wrong is happening since 'offset' is set to 0 (other values could lead to memory corruption), but it would be more correct to use the find_first_bit() function instead. Coverity Scan issue 1469342 Signed-off-by: Artem Mygaiev <artem_mygaiev@xxxxxxxx> diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index d831b35525..fd63906e9b 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -362,7 +362,7 @@ int vgic_vcpu_pending_irq(struct vcpu *v) ASSERT(v == current); mask_priority = gic_hw_ops->read_vmcr_priority(); - active_priority = find_next_bit(&apr, 32, 0); + active_priority = find_first_bit(&apr, 32); spin_lock_irqsave(&v->arch.vgic.lock, flags); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |