Skip to contentSkip to conversation

iommu/vt-d: fix a loop in prq_event_thread()

PATCH In review Dan Carpenter 2 participants 2 messages Oct 17, 2015 – Oct 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: fix a loop in prq_event_thread()

There is an extra semi-colon on this if statement so we always break on the first iteration.

Fixes 0204a4960982 ('iommu/vt-d: Add callback to device driver on page faults')
drivers/iommu/intel-svm.c +1 -1
index 99a7803..dd070e6 100644
@@ -536,7 +536,7 @@ static irqreturn_t prq_event_thread(int irq, void *d)
 		/* Accounting for major/minor faults? */
 		rcu_read_lock();
 		list_for_each_entry_rcu(sdev, &svm->devs, list) {
-			if (sdev->sid = PCI_DEVID(req->bus, req->devfn));
+			if (sdev->sid = PCI_DEVID(req->bus, req->devfn))
 				break;
 		}
 		/* Other devices can go away, but the drivers are not permitted
#1 lore raw
Quoted 2 lines · Dan Carpenter

There is an extra semi-colon on this if statement so we always break on the first iteration.

Heh, it worked in my testing with only one registered device :)

Oops; thanks :)

Signature · 2 lines
David Woodhouse                            Open Source Technology Centre
[email protected]                              Intel Corporation