All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: kvm@vger.kernel.org, mtosatti@redhat.com
Subject: [PATCH] msix: fix crash on msix_irq_entries access
Date: Wed, 20 Oct 2010 06:50:18 +0200	[thread overview]
Message-ID: <20101020045017.GA10096@redhat.com> (raw)

Since commit 889e30cc18e21f2091b77267dca8096d7dd34f8b,
msix.c doesn't include kvm/h anymore, so KVM_IRQCHIP
is never defined, and msix_irq_entries ends up as NULL.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/msix.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/hw/msix.c b/hw/msix.c
index 43efbd2..f12e4aa 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -389,12 +389,10 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries,
     if (ret)
         goto err_config;
 
-#ifdef KVM_CAP_IRQCHIP
     if (kvm_enabled() && kvm_irqchip_in_kernel()) {
         dev->msix_irq_entries = qemu_malloc(nentries *
                                             sizeof *dev->msix_irq_entries);
     }
-#endif
 
     dev->cap_present |= QEMU_PCI_CAP_MSIX;
     return 0;
-- 
1.7.3-rc1

                 reply	other threads:[~2010-10-20  4:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101020045017.GA10096@redhat.com \
    --to=mst@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.