[CRIU] [PATCH 1/7] restorer: Skip non-regular VMAs
David Francis
David.Francis at amd.com
Sat May 17 00:05:33 MSK 2025
amdgpu represents allocated device memory as a memory mapping
of the device file. This is a non-standard VMA that must
be handled by the plugin, not the normal VMA code.
Ignore all VMAs on device files.
Signed-off-by: David Francis <David.Francis at amd.com>
---
criu/pie/restorer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index 6d048c3f1..3a56ed210 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -1920,6 +1920,10 @@ __visible long __export_restore_task(struct task_restore_args *args)
for (m = 0; m < sizeof(vma_entry->madv) * 8; m++) {
if (vma_entry->madv & (1ul << m)) {
+
+ if (!(vma_entry_is(vma_entry, VMA_AREA_REGULAR)))
+ continue;
+
ret = sys_madvise(vma_entry->start, vma_entry_len(vma_entry), m);
if (ret) {
pr_err("madvise(%" PRIx64 ", %" PRIu64 ", %ld) "
--
2.34.1
More information about the CRIU
mailing list