mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
page-read: Don't let pr->pe remain NULL
CID 172196, issues/233. The advance method can keep pr->pe NULL while the rest of the code doesn't count on that. Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
This commit is contained in:
@@ -162,7 +162,7 @@ static void skip_pagemap_pages(struct page_read *pr, unsigned long len)
|
||||
static int seek_pagemap(struct page_read *pr, unsigned long vaddr)
|
||||
{
|
||||
if (!pr->pe)
|
||||
advance(pr);
|
||||
goto adv;
|
||||
|
||||
do {
|
||||
unsigned long start = pr->pe->vaddr;
|
||||
@@ -179,6 +179,8 @@ static int seek_pagemap(struct page_read *pr, unsigned long vaddr)
|
||||
|
||||
if (end <= vaddr)
|
||||
skip_pagemap_pages(pr, end - pr->cvaddr);
|
||||
adv:
|
||||
; /* otherwise "label at end of compound stmt" gcc error */
|
||||
} while (advance(pr));
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user