[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Insertion into head of austere heap misses setting reverse link
The heap is maintained as a doubly linked list of objects but both __AllocSmall() and __FreeSmall() are missing setup of the reverse link when a new object is inserted at the head. This patch adds the necessary fix. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Reported-by: Gregory Jacklin <jackling@xxxxxxxxxx> --- src/xencrsh/austere.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xencrsh/austere.c b/src/xencrsh/austere.c index c242006..6851475 100644 --- a/src/xencrsh/austere.c +++ b/src/xencrsh/austere.c @@ -262,6 +262,7 @@ __AllocSmall( SubHeap->Next->Prev = SubHeap->Prev; SubHeap->Prev = NULL; SubHeap->Next = AustereHeap.HeadSubHeap; + AustereHeap.HeadSubHeap->Prev = SubHeap; AustereHeap.HeadSubHeap = SubHeap; } return Res; @@ -327,6 +328,7 @@ __FreeSmall( SubHeap->Next->Prev = SubHeap->Prev; SubHeap->Prev = NULL; SubHeap->Next = AustereHeap.HeadSubHeap; + AustereHeap.HeadSubHeap->Prev = SubHeap; AustereHeap.HeadSubHeap = SubHeap; } } -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |