@@ -4677,6 +4677,12 @@ KVM_PV_ENABLE
command has succeeded, any CPU added via hotplug will become
protected during its creation as well.
+ Errors:
+
+ ===== =============================
+ EINTR an unmasked signal is pending
+ ===== =============================
+
KVM_PV_DISABLE
Deregister the VM from the Ultravisor and reclaim the memory that
@@ -2552,12 +2552,13 @@ int gmap_mark_unmergeable(void)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
+ int ret;
for (vma = mm->mmap; vma; vma = vma->vm_next) {
- if (ksm_madvise(vma, vma->vm_start, vma->vm_end,
- MADV_UNMERGEABLE, &vma->vm_flags)) {
- return -ENOMEM;
- }
+ ret = ksm_madvise(vma, vma->vm_start, vma->vm_end,
+ MADV_UNMERGEABLE, &vma->vm_flags);
+ if (ret)
+ return ret;
}
mm->def_flags &= ~VM_MERGEABLE;
return 0;