diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-08-22 23:09:47 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-23 20:19:59 -0500 |
commit | 98609cd8fcf755c0ba7049d751353b8b2e243b65 (patch) | |
tree | e6bb0578a7561e8b4c4cd9eed93843216761d236 /hw | |
parent | da5a44e8b0b727681fc33e8d94832d1cae48a788 (diff) |
ivshmem: fix memory_region_del_eventfd assertion failure
We do not register ioeventfds unless the IVSHMEM_IOEVENTFD feature
is set. The same feature must be checked before releasing the eventfds.
Regression introduced by commit 563027c (ivshmem: use EventNotifier and
memory API, 2012-07-05).
Reported-by: Cam Macdonnell <cam@cs.ualberta.ca>
Tested-by: Cam Macdonnell <cam@cs.ualberta.ca>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ivshmem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index b4d65a6db5..47f2a16833 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -366,6 +366,10 @@ static void close_guest_eventfds(IVShmemState *s, int posn) { int i, guest_curr_max; + if (!ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) { + return; + } + guest_curr_max = s->peers[posn].nb_eventfds; memory_region_transaction_begin(); |