All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] iommu/vt-d: fix a loop in prq_event_thread()
@ 2015-10-17  5:18 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-10-17  5:18 UTC (permalink / raw)
  To: Joerg Roedel, David Woodhouse
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c
index 99a7803..dd070e6 100644
--- a/drivers/iommu/intel-svm.c
+++ b/drivers/iommu/intel-svm.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch] iommu/vt-d: fix a loop in prq_event_thread()
@ 2015-10-17  5:18 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-10-17  5:18 UTC (permalink / raw)
  To: Joerg Roedel, David Woodhouse
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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')
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c
index 99a7803..dd070e6 100644
--- a/drivers/iommu/intel-svm.c
+++ b/drivers/iommu/intel-svm.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch] iommu/vt-d: fix a loop in prq_event_thread()
@ 2015-10-17  5:18 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-10-17  5:18 UTC (permalink / raw)
  To: Joerg Roedel, David Woodhouse; +Cc: iommu, linux-kernel, kernel-janitors

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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c
index 99a7803..dd070e6 100644
--- a/drivers/iommu/intel-svm.c
+++ b/drivers/iommu/intel-svm.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [patch] iommu/vt-d: fix a loop in prq_event_thread()
  2015-10-17  5:18 ` Dan Carpenter
  (?)
@ 2015-10-18 14:26   ` Woodhouse, David
  -1 siblings, 0 replies; 6+ messages in thread
From: Woodhouse, David @ 2015-10-18 14:26 UTC (permalink / raw)
  To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
	dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

On Sat, 2015-10-17 at 08:18 +0300, Dan Carpenter wrote:
> 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 :)

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3437 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] iommu/vt-d: fix a loop in prq_event_thread()
@ 2015-10-18 14:26   ` Woodhouse, David
  0 siblings, 0 replies; 6+ messages in thread
From: Woodhouse, David @ 2015-10-18 14:26 UTC (permalink / raw)
  To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
	dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org


[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]

On Sat, 2015-10-17 at 08:18 +0300, Dan Carpenter wrote:
> 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 :)

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org                              Intel Corporation


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3437 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] iommu/vt-d: fix a loop in prq_event_thread()
@ 2015-10-18 14:26   ` Woodhouse, David
  0 siblings, 0 replies; 6+ messages in thread
From: Woodhouse, David @ 2015-10-18 14:26 UTC (permalink / raw)
  To: joro@8bytes.org, dan.carpenter@oracle.com
  Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	kernel-janitors@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

On Sat, 2015-10-17 at 08:18 +0300, Dan Carpenter wrote:
> 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 :)

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3437 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-18 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-17  5:18 [patch] iommu/vt-d: fix a loop in prq_event_thread() Dan Carpenter
2015-10-17  5:18 ` Dan Carpenter
2015-10-17  5:18 ` Dan Carpenter
2015-10-18 14:26 ` Woodhouse, David
2015-10-18 14:26   ` Woodhouse, David
2015-10-18 14:26   ` Woodhouse, David

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.