Right after the loop the lock is being dropped, so all loop exits
should happen with the lock still held.
Reported-by: Kristoffer Egefelt <kristoffer@itoc.dk>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Kristoffer Egefelt <kristoffer@itoc.dk>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
for ( i = 0; ; )
{
msi_set_mask_bit(desc, entry[i].msi_attrib.masked);
- spin_unlock_irqrestore(&desc->lock, flags);
if ( !--nr )
break;
+ spin_unlock_irqrestore(&desc->lock, flags);
desc = &irq_desc[entry[++i].irq];
spin_lock_irqsave(&desc->lock, flags);
if ( desc->msi_desc != entry + i )