[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH xenbus] Re-work ASSERTion to avoid issues with VERIFIER list checks
From: Paul Durrant <pdurrant@xxxxxxxxxx> The current mechanism of ASSERTing that there is a single item on the list seems to fail when list checking is turned on in VERIFIER. Avoid going round the back of the list macros by instead ASSERTing that the list is empty, once the entry is removed. Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> --- src/xenbus/cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenbus/cache.c b/src/xenbus/cache.c index ba0177b71223..48772d419fd0 100644 --- a/src/xenbus/cache.c +++ b/src/xenbus/cache.c @@ -385,14 +385,14 @@ CacheDestroySlab( // The only reason the cursor should be pointing at this slab is // if it is the only one in the list. // - if (Cache->Cursor == &Slab->ListEntry) { - ASSERT(Slab->ListEntry.Flink == &Cache->SlabList); - ASSERT(Slab->ListEntry.Blink == &Cache->SlabList); + if (Cache->Cursor == &Slab->ListEntry) Cache->Cursor = &Cache->SlabList; - } RemoveEntryList(&Slab->ListEntry); + ASSERT(Cache->Cursor != &Cache->SlabList || + IsListEmpty(&Cache->SlabList)); + Index = Slab->MaximumOccupancy; while (--Index >= 0) { PVOID Object = (PVOID)&Slab->Buffer[Index * Cache->Size]; -- 2.17.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |