Lin Liu
2018-09-18 09:12:28 UTC
To traverse the RangeSet list, the Cursor needs to move forward,
otherwise it will end with dead loop
Signed-off-by: Lin Liu <***@citrix.com>
---
src/xenbus/range_set.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/xenbus/range_set.c b/src/xenbus/range_set.c
index f52af63..162e3c8 100644
--- a/src/xenbus/range_set.c
+++ b/src/xenbus/range_set.c
@@ -213,6 +213,8 @@ RangeSetPop(
if ((ULONGLONG)(Range->End + 1 - Range->Start) >= Count)
goto found;
+
+ Cursor = Cursor->Flink;
}
goto fail3;
otherwise it will end with dead loop
Signed-off-by: Lin Liu <***@citrix.com>
---
src/xenbus/range_set.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/xenbus/range_set.c b/src/xenbus/range_set.c
index f52af63..162e3c8 100644
--- a/src/xenbus/range_set.c
+++ b/src/xenbus/range_set.c
@@ -213,6 +213,8 @@ RangeSetPop(
if ((ULONGLONG)(Range->End + 1 - Range->Start) >= Count)
goto found;
+
+ Cursor = Cursor->Flink;
}
goto fail3;
--
2.17.0
2.17.0