qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for 1.2] ivshmem: fix memory_region_del_eventfd asse


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH for 1.2] ivshmem: fix memory_region_del_eventfd assertion failure
Date: Wed, 22 Aug 2012 23:09:47 +0200

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 <address@hidden>
Tested-by: Cam Macdonnell <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 hw/ivshmem.c | 4 ++++
 1 file modificato, 4 inserzioni(+)

diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index b4d65a6..47f2a16 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();
-- 
1.7.11.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]