Commit b5149a5f authored by Paolo Bonzini's avatar Paolo Bonzini

Merge tag 'kvm-s390-master-4.9-2' of...

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 d86bd1be ("mm/slub: support left redzone") or
with slab debugging the allocation of our diag224 buffer is not
aligned properly. Let's fix this.
parents 85c856b3 45c7ee43
...@@ -315,7 +315,7 @@ static void fill_diag(struct sthyi_sctns *sctns) ...@@ -315,7 +315,7 @@ static void fill_diag(struct sthyi_sctns *sctns)
if (r < 0) if (r < 0)
goto out; goto out;
diag224_buf = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); diag224_buf = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
if (!diag224_buf || diag224(diag224_buf)) if (!diag224_buf || diag224(diag224_buf))
goto out; goto out;
...@@ -378,7 +378,7 @@ static void fill_diag(struct sthyi_sctns *sctns) ...@@ -378,7 +378,7 @@ static void fill_diag(struct sthyi_sctns *sctns)
sctns->par.infpval1 |= PAR_WGHT_VLD; sctns->par.infpval1 |= PAR_WGHT_VLD;
out: out:
kfree(diag224_buf); free_page((unsigned long)diag224_buf);
vfree(diag204_buf); vfree(diag204_buf);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment