]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: XIVE: Fix potential page leak on error path
authorGreg Kurz <groug@kaod.org>
Wed, 13 Nov 2019 16:46:19 +0000 (17:46 +0100)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 21 Nov 2019 05:24:41 +0000 (16:24 +1100)
commite944aae9658025e0e3bd0829456ddfd566eea4d5
tree212f971a57c95bdbbff0979d2e169b76d69d3978
parente140d27fa65de9daef9b963c55e8406181d3d862
KVM: PPC: Book3S HV: XIVE: Fix potential page leak on error path

We need to check the host page size is big enough to accomodate the
EQ. Let's do this before taking a reference on the EQ page to avoid
a potential leak if the check fails.

Cc: stable@vger.kernel.org # v5.2
Fixes: 653e8b3e4681 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration")
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_xive_native.c