KVM/arm64 fixes for 6.8, take #2

- Avoid dropping the page refcount twice when freeing an unlinked
   page-table subtree.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmXOK/wACgkQI9DQutE9
 ekOrRg/6AmztTv19AudXL1+iLd35Hbfx49WKlgCghpTTDwHg+d4gxiM/S19A3l71
 w1s/XxWINZNIdjklc4XQVuUkIgvx51x7orBP8FnGoKNh3qVz3rcWd+DFkMoAUDMQ
 f/r1nAq/GfP5syDschYXpfSHZwe0n8tkxiq2VDR+V8khFzx5EWlTwj/rMNnWSdQx
 YxCLrlb1MD5M+IKYThO0b2ttcax5hNw/7LoBbV2YsjYkEYsxzKR5TbzgWBOre9pQ
 Mh0xn5fZHEfYcW7CGYDn4niHJkXoaG6BCDSR2XkUKuZVLzKDYMlF/5WT2eUqRHmJ
 b6oA/mA6ktFL//WfZpejSUDLa6ZEqjCE/g2XRI4YRvpm1SLhIGFy3d5ZBQp7zulK
 7IICUGlG+QuQEyHG/t/LUl8Y7VveMUpoqdIhronvNNJlmvPtsAxhH6qBq/MSkA8l
 E4SzEqXxJKWLNTt1yCWLeBNE1MApERwDdUoKA6Z3tG8GE0/DtWsC6mdVBvb8pxEY
 /z+53ZsHKpfJ7+4FqHHv7L+fmOUuyuiBbUfUNI0ab4MCfJwFiDB1DDuS/DH5OE2j
 SogWQpFxPCiqMww+UNA4GMDAaQkCNiAR410ZDp5WzBYJW+eBG8B97WJYpVECqk92
 /asMDtU8pEjilQBZogjAIDlaJF1RxFAfCOWJRh0U8VKF1XfcxuE=
 =Coky
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 6.8, take #2

- Avoid dropping the page refcount twice when freeing an unlinked
  page-table subtree.
This commit is contained in:
Paolo Bonzini 2024-02-16 12:02:38 -05:00
commit 9895ceeb5c

View File

@ -1419,7 +1419,6 @@ kvm_pte_t *kvm_pgtable_stage2_create_unlinked(struct kvm_pgtable *pgt,
level + 1);
if (ret) {
kvm_pgtable_stage2_free_unlinked(mm_ops, pgtable, level);
mm_ops->put_page(pgtable);
return ERR_PTR(ret);
}
@ -1502,7 +1501,6 @@ static int stage2_split_walker(const struct kvm_pgtable_visit_ctx *ctx,
if (!stage2_try_break_pte(ctx, mmu)) {
kvm_pgtable_stage2_free_unlinked(mm_ops, childp, level);
mm_ops->put_page(childp);
return -EAGAIN;
}