Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753544AbbFYKFx (ORCPT ); Thu, 25 Jun 2015 06:05:53 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39845 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753252AbbFYKDl (ORCPT ); Thu, 25 Jun 2015 06:03:41 -0400 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Jiang Liu , "Michael S. Tsirkin" , Luis Henriques Subject: [PATCH 3.16.y-ckt 53/71] virtio_pci: Clear stale cpumask when setting irq affinity Date: Thu, 25 Jun 2015 11:02:32 +0100 Message-Id: <1435226570-3669-54-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435226570-3669-1-git-send-email-luis.henriques@canonical.com> References: <1435226570-3669-1-git-send-email-luis.henriques@canonical.com> X-Extended-Stable: 3.16 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1381 Lines: 38 3.16.7-ckt14 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiang Liu 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 Signed-off-by: Michael S. Tsirkin [ luis: backported to 3.16: - file rename: virtio_pci_common.c -> virtio_pci.c ] Signed-off-by: Luis Henriques --- 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/