[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] virtio-net: only delete bh that existed



commit 5326636ff2390bb260b3d8d14899b04db205992d
Author:     Jason Wang <jasowang@xxxxxxxxxx>
AuthorDate: Wed Nov 6 16:58:08 2013 +0800
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Tue Dec 3 19:56:56 2013 -0600

    virtio-net: only delete bh that existed
    
    We delete without check whether it existed during exit. This will lead NULL
    pointer deference since it was created conditionally depends on guest driver
    status and features. So add a check of existence before trying to delete it.
    
    Cc: qemu-stable@xxxxxxxxxx
    Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
    Reviewed-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Message-id: 1383728288-28469-1-git-send-email-jasowang@xxxxxxxxxx
    Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
    (cherry picked from commit fe2dafa02de4f80ab36f6e0f4ddfcd6418c03c49)
    
    Conflicts:
    
        hw/net/virtio-net.c
    
    *modified to reflect timer function names for 1.6
    
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 hw/net/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index aa1880c..bb757b3 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1600,7 +1600,7 @@ static int virtio_net_device_exit(DeviceState *qdev)
         if (q->tx_timer) {
             qemu_del_timer(q->tx_timer);
             qemu_free_timer(q->tx_timer);
-        } else {
+        } else if (q->tx_bh) {
             qemu_bh_delete(q->tx_bh);
         }
     }
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.