[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/32] virtio-net: only delete bh that existed
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 21/32] virtio-net: only delete bh that existed |
Date: |
Wed, 4 Dec 2013 08:34:28 -0600 |
From: Jason Wang <address@hidden>
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: address@hidden
Signed-off-by: Jason Wang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(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 <address@hidden>
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
}
--
1.7.9.5
- [Qemu-devel] [PATCH 08/32] misc: Use new rotate functions, (continued)
- [Qemu-devel] [PATCH 08/32] misc: Use new rotate functions, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 12/32] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 30/32] qdev-monitor: Unref device when device_add fails, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 31/32] pci: unregister vmstate_pcibus on unplug, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 32/32] rng-egd: offset the point when repeatedly read from the buffer, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 29/32] qdev-monitor: Fix crash when device_add is called with abstract driver, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 26/32] vfio-pci: Fix multifunction=on, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 28/32] qom: Fix memory leak in object_property_set_link(), Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 13/32] monitor: eliminate monitor_event_state_lock, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 27/32] virtio-net: fix the memory leak in rxfilter_notify(), Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 21/32] virtio-net: only delete bh that existed,
Michael Roth <=
- [Qemu-devel] [PATCH 24/32] qcow2: count_contiguous_clusters and compression, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 25/32] qcow2: fix possible corruption when reading multiple clusters, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 20/32] linux-user: Fix stat64 syscall for SPARC64, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 14/32] memory: fix 128 arithmetic in info mtree, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 19/32] configure: Explicitly set ARFLAGS so we can build with GNU Make 4.0, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 17/32] qapi: fix memleak by adding implict struct functions in dealloc visitor, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 11/32] vmdk: Fix vmdk_parse_extents, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 15/32] Adjust qapi-visit for python-2.4.3, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 18/32] tests: fix memleak in error path test for input visitor, Michael Roth, 2013/12/04
- [Qemu-devel] [PATCH 23/32] Fix pc migration from qemu <= 1.5, Michael Roth, 2013/12/04