aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-07 19:55:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-07 19:55:27 -0500
commita04521ab8071a46dff5d618c98b37427a8aab9f4 (patch)
tree99a193150075c3ac7efd1474e6e7d27bdc9e253b /drivers
parent3227e04e21ca82745cf347c4724db1514692a500 (diff)
parent68ba45ff389295ddccbb976b8881de7c46140e00 (diff)
Merge tag 'stable/for-linus-3.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull Xen fixes from Konrad Rzeszutek Wilk: "This has two fixes. One is a security fix wherein we would spam the kernel printk buffer if one of the guests was misbehaving. The other is much tamer and it was us only checking for one type of error from the IRQ subsystem (when allocating new IRQs) instead of for all of them. - Fix an IRQ allocation where we only check for a specific error (-1). - CVE-2013-0231 / XSA-43. Make xen-pciback rate limit error messages from xen_pcibk_enable_msi{,x}()" * tag 'stable/for-linus-3.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: fix error handling path if xen_allocate_irq_dynamic fails xen-pciback: rate limit error messages from xen_pcibk_enable_msi{,x}()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/events.c4
-rw-r--r--drivers/xen/xen-pciback/pciback_ops.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 0be4df39e953..74d77dfa5f63 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -840,7 +840,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
840 840
841 if (irq == -1) { 841 if (irq == -1) {
842 irq = xen_allocate_irq_dynamic(); 842 irq = xen_allocate_irq_dynamic();
843 if (irq == -1) 843 if (irq < 0)
844 goto out; 844 goto out;
845 845
846 irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, 846 irq_set_chip_and_handler_name(irq, &xen_dynamic_chip,
@@ -944,7 +944,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
944 944
945 if (irq == -1) { 945 if (irq == -1) {
946 irq = xen_allocate_irq_dynamic(); 946 irq = xen_allocate_irq_dynamic();
947 if (irq == -1) 947 if (irq < 0)
948 goto out; 948 goto out;
949 949
950 irq_set_chip_and_handler_name(irq, &xen_percpu_chip, 950 irq_set_chip_and_handler_name(irq, &xen_percpu_chip,
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c
index 97f5d264c31e..37c1f825f513 100644
--- a/drivers/xen/xen-pciback/pciback_ops.c
+++ b/drivers/xen/xen-pciback/pciback_ops.c
@@ -135,7 +135,6 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev,
135 struct pci_dev *dev, struct xen_pci_op *op) 135 struct pci_dev *dev, struct xen_pci_op *op)
136{ 136{
137 struct xen_pcibk_dev_data *dev_data; 137 struct xen_pcibk_dev_data *dev_data;
138 int otherend = pdev->xdev->otherend_id;
139 int status; 138 int status;
140 139
141 if (unlikely(verbose_request)) 140 if (unlikely(verbose_request))
@@ -144,8 +143,9 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev,
144 status = pci_enable_msi(dev); 143 status = pci_enable_msi(dev);
145 144
146 if (status) { 145 if (status) {
147 printk(KERN_ERR "error enable msi for guest %x status %x\n", 146 pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n",
148 otherend, status); 147 pci_name(dev), pdev->xdev->otherend_id,
148 status);
149 op->value = 0; 149 op->value = 0;
150 return XEN_PCI_ERR_op_failed; 150 return XEN_PCI_ERR_op_failed;
151 } 151 }
@@ -223,10 +223,10 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
223 pci_name(dev), i, 223 pci_name(dev), i,
224 op->msix_entries[i].vector); 224 op->msix_entries[i].vector);
225 } 225 }
226 } else { 226 } else
227 printk(KERN_WARNING DRV_NAME ": %s: failed to enable MSI-X: err %d!\n", 227 pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n",
228 pci_name(dev), result); 228 pci_name(dev), pdev->xdev->otherend_id,
229 } 229 result);
230 kfree(entries); 230 kfree(entries);
231 231
232 op->value = result; 232 op->value = result;