Skip to content

Commit f0ebe33

Browse files
committed
look for nr_pages first
Signed-off-by: alam0rt <sam@samlockart.com>
1 parent 6eb6595 commit f0ebe33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coredump/criu_coredump/coredump.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ def _get_page(self, pid, page_no):
794794
off = 0 # in pages
795795
for m in pagemap[1:]:
796796
found = False
797-
for i in range(m["compat_nr_pages"]):
797+
num_pages = m.get("nr_pages", m.compat_nr_pages)
798+
for i in range(num_pages):
798799
if m["vaddr"] + i * PAGESIZE == page_no * PAGESIZE:
799800
found = True
800801
break

0 commit comments

Comments
 (0)