This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [qemu-xen-unstable] passthrough: Fix no_wb not to crash

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] passthrough: Fix no_wb not to crash on unknown registers
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Mon, 7 Dec 2009 04:50:03 -0800
Delivery-date: Mon, 07 Dec 2009 04:50:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit 9297e6402f6aa1b52e5577edc875eb2d2163baeb
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Mon Dec 7 12:25:54 2009 +0000

    passthrough: Fix no_wb not to crash on unknown registers
    e2b98415256cb264bc25e6df539ec0dc9d1b85b0 broke things sometimes:
     If pt_find_reg_grp() fails and returns NULL, it will jump to out:,
     but at this time reg is still NULL (pt_find_reg() is not reached)
     which leads to a NULL dereference.
    This patch fixes it.
    Submitted-By: Qing He <qing.he@xxxxxxxxx>
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
 hw/pass-through.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index b125d72..e7bd386 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -1556,7 +1556,7 @@ static void pt_pci_write_config(PCIDevice *d, uint32_t 
address, uint32_t val,
     val >>= ((address & 3) << 3);
-    if (!reg->no_wb) {
+    if (!(reg && reg->no_wb)) {  /* unknown regs are passed through */
         ret = pci_write_block(pci_dev, address, (uint8_t *)&val, len);
         if (!ret)
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] passthrough: Fix no_wb not to crash on unknown registers, Ian Jackson <=