提交 63f7166a 编写于 作者: P Paolo Bonzini 提交者: Michael Roth

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 563027cc (ivshmem: use EventNotifier and
memory API, 2012-07-05).
Reported-by: NCam Macdonnell <cam@cs.ualberta.ca>
Tested-by: NCam Macdonnell <cam@cs.ualberta.ca>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 98609cd8)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 1d34dff0
......@@ -351,6 +351,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;
for (i = 0; i < guest_curr_max; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册