diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-27 07:22:54 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-27 07:22:54 -0400 |
| commit | b5149a5fd15225c48b45e3f18bb6468fbae9bbd1 (patch) | |
| tree | 38dc13e36e62faa8aad97c5b2f6c90299301b9de | |
| parent | 85c856b39b479dde410ddd09df1da745343010c9 (diff) | |
| parent | 45c7ee43a5184ddbff652ee0d2e826f86f1b616b (diff) | |
Merge tag 'kvm-s390-master-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
KVM: s390: Fix wrong memory allocation
With commit d86bd1bece6f ("mm/slub: support left redzone") or
with slab debugging the allocation of our diag224 buffer is not
aligned properly. Let's fix this.
| -rw-r--r-- | arch/s390/kvm/sthyi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/sthyi.c b/arch/s390/kvm/sthyi.c index bd98b7d25200..05c98bb853cf 100644 --- a/arch/s390/kvm/sthyi.c +++ b/arch/s390/kvm/sthyi.c | |||
| @@ -315,7 +315,7 @@ static void fill_diag(struct sthyi_sctns *sctns) | |||
| 315 | if (r < 0) | 315 | if (r < 0) |
| 316 | goto out; | 316 | goto out; |
| 317 | 317 | ||
| 318 | diag224_buf = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); | 318 | diag224_buf = (void *)__get_free_page(GFP_KERNEL | GFP_DMA); |
| 319 | if (!diag224_buf || diag224(diag224_buf)) | 319 | if (!diag224_buf || diag224(diag224_buf)) |
| 320 | goto out; | 320 | goto out; |
| 321 | 321 | ||
| @@ -378,7 +378,7 @@ static void fill_diag(struct sthyi_sctns *sctns) | |||
| 378 | sctns->par.infpval1 |= PAR_WGHT_VLD; | 378 | sctns->par.infpval1 |= PAR_WGHT_VLD; |
| 379 | 379 | ||
| 380 | out: | 380 | out: |
| 381 | kfree(diag224_buf); | 381 | free_page((unsigned long)diag224_buf); |
| 382 | vfree(diag204_buf); | 382 | vfree(diag204_buf); |
| 383 | } | 383 | } |
| 384 | 384 | ||
