diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-22 14:49:01 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-22 14:49:01 +0000 |
commit | ad02ad6fda4499fdf71c82ea1c7f37fbea25985d (patch) | |
tree | 49bcc84e2883fa9cc872f761676deaba7e7a6447 /block-raw-posix.c | |
parent | e5fd43a9268661c19e4a743680003a181dd67e0a (diff) |
Do not allow AIO to be inited multiple times
This prevents two signalfd() threads from being spawned. This problem was
originally spotted by Blue Swirl.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5289 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-raw-posix.c')
-rw-r--r-- | block-raw-posix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c index 7c42c108e..26819a4d8 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -511,6 +511,9 @@ void qemu_aio_init(void) { sigset_t mask; + if (aio_initialized) + return; + aio_initialized = 1; /* Make sure to block AIO signal */ |