aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorPaolo Bonzini2020-03-30 09:02:26 -0400
committerPaolo Bonzini2020-03-30 09:02:26 -0400
commit830948eb68265ac7f3f364aa9801550feafec0d6 (patch)
treee68647af8a8d97d3a102168cef854b90c0e64562 /arch/s390
parent8bf8961332bd6393716297e1a2b628d88300b2f2 (diff)
parent7a2653612bb6f18fb236c5b0c4d28f7b459bf7c2 (diff)
Merge tag 'kvm-s390-next-5.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
KVM: s390: Fix for error codes - return the proper error to userspace when a signal interrupts the KSM unsharing operation
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/mm/gmap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 03c899849c38..2fbece47ef6f 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -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;