Re: [PATCH 1/1] s390/mm/kvm: fix mis-merge in gmap handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 04, 2016 at 09:41:32AM +0200, Christian Borntraeger wrote:
> 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@xxxxxxxxxxxxxxxxxx>
> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> ---
>  arch/s390/mm/gmap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
> index 69247b4..cace818 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;

Acked-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux