Discussion:
[win-pv-devel] [PATCH] Function RangeSetPop needs to move Cursor forward
Lin Liu
2018-09-18 09:12:28 UTC
Permalink
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;
--
2.17.0
Paul Durrant
2018-09-18 09:40:06 UTC
Permalink
-----Original Message-----
Behalf Of Lin Liu
Sent: 18 September 2018 10:12
Subject: [win-pv-devel] [PATCH] Function RangeSetPop needs to move Cursor
forward
To traverse the RangeSet list, the Cursor needs to move forward,
otherwise it will end with dead loop
---
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
_______________________________________________
win-pv-devel mailing list
https://lists.xenproject.org/mailman/listinfo/win-pv-devel
Loading...