[CRIU] [PATCH 22/44] restorer: don't touch VM above TASK_SIZE.
Alexander Kartashov
alekskartashov at parallels.com
Mon Jan 7 10:04:51 EST 2013
VM above TASK_SIZE is read-only but some areas are mapped on ARM
into the process address space.
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
pie/restorer.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/pie/restorer.c b/pie/restorer.c
index e3bbde1..400f8f5 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -399,6 +399,10 @@ long __export_restore_task(struct task_restore_core_args *args)
}
}
+ if (vma_entry->end >= TASK_SIZE) {
+ continue;
+ }
+
if (vma_entry->end > premmapped_end) {
if (vma_entry->start < premmapped_end)
addr = premmapped_end;
@@ -421,6 +425,10 @@ long __export_restore_task(struct task_restore_core_args *args)
if (!vma_priv(vma_entry))
continue;
+ if (vma_entry->end >= TASK_SIZE) {
+ continue;
+ }
+
if (vma_entry->start > vma_entry->shmid)
break;
@@ -438,6 +446,10 @@ long __export_restore_task(struct task_restore_core_args *args)
if (!vma_priv(vma_entry))
continue;
+ if (vma_entry->start > TASK_SIZE) {
+ continue;
+ }
+
if (vma_entry->start < vma_entry->shmid)
break;
--
1.7.10.4
More information about the CRIU
mailing list