Fam Zheng e95205e1f9 dma-helpers: Fix race condition of continue_after_map_failure and dma_aio_cancel
If DMA's owning thread cancels the IO while the bounce buffer's owning thread
is notifying the "cpu client list", a use-after-free happens:

     continue_after_map_failure               dma_aio_cancel
     ------------------------------------------------------------------
     aio_bh_new
                                              qemu_bh_delete
     qemu_bh_schedule (use after free)

Also, the old code doesn't run the bh in the right AioContext.

Fix both problems by passing a QEMUBH to cpu_register_map_client.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1426496617-10702-6-git-send-email-famz@redhat.com>
[Remove unnecessary forward declaration. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-04-27 18:24:18 +02:00
2013-04-18 13:50:53 +02:00
2015-02-06 16:11:38 +00:00
2015-03-19 11:30:37 +03:00
2015-04-20 09:27:01 +01:00
2015-03-09 09:14:28 +00:00
2012-09-07 09:02:44 +03:00
2015-04-04 09:45:59 +03:00
2014-06-16 13:24:35 +02:00
2013-09-05 09:40:31 -05:00
2015-02-23 10:56:09 -05:00
2015-03-27 10:01:12 +00:00
2013-10-11 09:34:56 -07:00
2008-10-12 17:54:42 +00:00
2015-03-25 13:38:07 +01:00
2015-02-16 17:30:19 +01:00
2013-07-23 02:41:31 +02:00
2015-03-19 11:35:52 +03:00
2015-04-17 14:27:42 +01:00
2015-03-17 14:31:15 +01:00
2015-03-12 09:13:07 +00:00
2015-04-02 15:58:39 +02:00
2015-02-05 17:16:14 +01:00
2015-03-20 09:50:08 +00:00
2015-02-16 15:07:19 +00:00
2014-05-24 00:07:29 +04:00
2015-03-19 17:47:08 +00:00
2013-10-11 09:34:56 -07:00
2015-01-14 10:38:57 +01:00
2015-02-12 21:21:38 -08:00
2015-03-10 09:26:22 +01:00
2015-04-25 22:05:07 +01:00
2013-10-11 09:34:56 -07:00
2015-03-26 15:31:46 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
A fork of QEMU-Nyx which is better suited for my bachelors thesis
Readme 154 MiB