diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-04-04 09:41:32 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-04-05 14:19:07 +0200 |
commit | 9c650d09a9c3029cc90cae5d2cd7ab131bdb86c2 (patch) | |
tree | ebca9199dd2be43af77cf6535acb63cd3f304cb0 /arch | |
parent | 14f4760562e41d50817d56b42c821d70ad10b483 (diff) | |
download | linux-stable-9c650d09a9c3029cc90cae5d2cd7ab131bdb86c2.tar.gz linux-stable-9c650d09a9c3029cc90cae5d2cd7ab131bdb86c2.tar.bz2 linux-stable-9c650d09a9c3029cc90cae5d2cd7ab131bdb86c2.zip |
s390/mm/kvm: fix mis-merge in gmap handling
commit 1e133ab296f3 ("s390/mm: split arch/s390/mm/pgtable.c") dropped
some changes from commit a3a92c31bf0b ("KVM: s390: fix mismatch
between user and in-kernel guest limit") - this breaks KVM for some
memory sizes (kvm-s390: failed to commit memory region) like
exactly 2GB.
Cc: Dominik Dingel <dingel@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/mm/gmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c index 69247b4dcc43..cace818d86eb 100644 --- a/arch/s390/mm/gmap.c +++ b/arch/s390/mm/gmap.c @@ -23,7 +23,7 @@ /** * gmap_alloc - allocate a guest address space * @mm: pointer to the parent mm_struct - * @limit: maximum size of the gmap address space + * @limit: maximum address of the gmap address space * * Returns a guest address space structure. */ @@ -292,7 +292,7 @@ int gmap_map_segment(struct gmap *gmap, unsigned long from, if ((from | to | len) & (PMD_SIZE - 1)) return -EINVAL; if (len == 0 || from + len < from || to + len < to || - from + len > TASK_MAX_SIZE || to + len > gmap->asce_end) + from + len - 1 > TASK_MAX_SIZE || to + len - 1 > gmap->asce_end) return -EINVAL; flush = 0; |