[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] virtio-serial: delete timer if active during ex
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PATCH 4/4] virtio-serial: delete timer if active during exit |
Date: |
Thu, 13 Dec 2012 16:07:56 +0530 |
The post_load timer was being freed, but not deleted. This could cause
problems when the timer is armed, but the device is hot-unplugged before
the callback is executed.
Signed-off-by: Amit Shah <address@hidden>
---
hw/virtio-serial-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 09d4659..fc0166c 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -1038,6 +1038,7 @@ void virtio_serial_exit(VirtIODevice *vdev)
g_free(vser->ports_map);
if (vser->post_load) {
g_free(vser->post_load->connected);
+ qemu_del_timer(vser->post_load->timer);
qemu_free_timer(vser->post_load->timer);
g_free(vser->post_load);
}
--
1.8.0.2
- [Qemu-devel] [PATCH 0/4] virtio-serial: Rework, fix post_load code, Amit Shah, 2012/12/13
- [Qemu-devel] [PATCH 1/4] virtio-serial: use uint32_t to count ports, Amit Shah, 2012/12/13
- [Qemu-devel] [PATCH 2/4] virtio-serial: move active ports loading to separate function, Amit Shah, 2012/12/13
- [Qemu-devel] [PATCH 3/4] virtio-serial: allocate post_load only at load-time, Amit Shah, 2012/12/13
- [Qemu-devel] [PATCH 4/4] virtio-serial: delete timer if active during exit,
Amit Shah <=
- Re: [Qemu-devel] [PATCH 0/4] virtio-serial: Rework, fix post_load code, Alon Levy, 2012/12/13