restorer: Skip non-regular VMAs

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@amd.com>
This commit is contained in:
David Francis 2025-02-12 09:26:21 -05:00 committed by Andrei Vagin
parent 920437205c
commit 7a4ee0ae8e

View file

@ -1989,6 +1989,9 @@ __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) "