diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2015-06-04 04:41:44 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-06-04 08:47:49 -0400 |
commit | 210d150e1f5da506875e376422ba31ead2d49621 (patch) | |
tree | 7922be7bde9ecd9380de4973bad251833d957c7c | |
parent | 8a7b19d8b542b87bccc3eaaf81dcc90a5ca48aea (diff) |
virtio_pci: Clear stale cpumask when setting irq affinity
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.
Cc: stable@vger.kernel.org
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | drivers/virtio/virtio_pci_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index e894eb278d83..eba1b7ac7294 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c | |||
@@ -423,6 +423,7 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu) | |||
423 | if (cpu == -1) | 423 | if (cpu == -1) |
424 | irq_set_affinity_hint(irq, NULL); | 424 | irq_set_affinity_hint(irq, NULL); |
425 | else { | 425 | else { |
426 | cpumask_clear(mask); | ||
426 | cpumask_set_cpu(cpu, mask); | 427 | cpumask_set_cpu(cpu, mask); |
427 | irq_set_affinity_hint(irq, mask); | 428 | irq_set_affinity_hint(irq, mask); |
428 | } | 429 | } |