[libvirt] [PATCH] Fix possible infinite loop in remote driver
Michal Privoznik
mprivozn at redhat.com
Tue Apr 12 14:58:48 UTC 2011
When we take out completed calls from queue we might end up
in circular pointer. We don't want pointer to previous item
point to element taken out.
---
src/remote/remote_driver.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 9310ddf..ec10010 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -10672,8 +10672,9 @@ remoteIOEventLoop(virConnectPtr conn,
*/
VIR_DEBUG("Waking up sleep %d %p %p", tmp->proc_nr, tmp, priv->waitDispatch);
virCondSignal(&tmp->cond);
+ } else {
+ prev = tmp;
}
- prev = tmp;
tmp = tmp->next;
}
--
1.7.4.2
More information about the libvir-list
mailing list