Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1172014 > unrolled thread

[PATCH 3.16.y-ckt 53/71] virtio_pci: Clear stale cpumask when setting irq affinity

Started byLuis Henriques <luis.henriques@canonical.com>
First post2015-06-25 12:10 +0200
Last post2015-06-25 12:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16.y-ckt 53/71] virtio_pci: Clear stale cpumask when setting irq affinity Luis Henriques <luis.henriques@canonical.com> - 2015-06-25 12:10 +0200

#1172014 — [PATCH 3.16.y-ckt 53/71] virtio_pci: Clear stale cpumask when setting irq affinity

FromLuis Henriques <luis.henriques@canonical.com>
Date2015-06-25 12:10 +0200
Subject[PATCH 3.16.y-ckt 53/71] virtio_pci: Clear stale cpumask when setting irq affinity
Message-ID<pFcgx-5Bx-5@gated-at.bofh.it>
3.16.7-ckt14 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jiang Liu <jiang.liu@linux.intel.com>

commit 210d150e1f5da506875e376422ba31ead2d49621 upstream.

The cpumask vp_dev->msix_affinity_masks[info->msix_vector] may contain
staled information when vp_set_vq_affinity() gets called, so clear it
before setting the new cpu bit mask.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
[ luis: backported to 3.16:
  - file rename: virtio_pci_common.c -> virtio_pci.c ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/virtio/virtio_pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 52c4607fec9e..c09527df161c 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -645,6 +645,7 @@ static int vp_set_vq_affinity(struct virtqueue *vq, int cpu)
 		if (cpu == -1)
 			irq_set_affinity_hint(irq, NULL);
 		else {
+			cpumask_clear(mask);
 			cpumask_set_cpu(cpu, mask);
 			irq_set_affinity_hint(irq, mask);
 		}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web