Skip to contentSkip to conversation

New Defects reported by Coverity Scan for XenProject

DISCUSSION Jan Beulich 1 participant 1 message Jan 25, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · On 24.01.2021 11:35, [email protected] wrote:

*** CID 1472394: Concurrent data access violations (MISSING_LOCK) /xen/drivers/passthrough/x86/hvm.c: 1054 in pci_clean_dpci_irq()
1048 list_for_each_entry_safe ( digl, tmp, &pirq_dpci->digl_list, list )
1049 {
1050 list_del(&digl->list);
1051 xfree(digl);
1052 }
1053 /* Note the pirq is now unbound. */

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

CID 1472394: Concurrent data access violations (MISSING_LOCK)
Accessing "pirq_dpci->flags" without holding lock "domain.event_lock". Elsewhere, "hvm_pirq_dpci.flags" is accessed with "domain.event_lock" held 10 out of 11 times.

1054 pirq_dpci->flags = 0;
1055
1056 return pt_pirq_softirq_active(pirq_dpci) ? -ERESTART : 0;
1057 }

The only (indirect) caller of this function is ...

Quoted 1 line

1059 int arch_pci_clean_pirqs(struct domain *d)

... this one, which very clearly acquires the lock in question. Does anyone have any idea what misleads Coverity here in its conclusion, and hence possibly what may silence this?

Jan