From: Greg KH <gregkh@linuxfoundation.org>
To: shaoqin.huang@intel.com
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Check every prev_roots in __kvm_mmu_free_obsolete_roots()
Date: Mon, 6 Jun 2022 11:26:46 +0200 [thread overview]
Message-ID: <Yp3IVmtCITw6qmub@kroah.com> (raw)
In-Reply-To: <20220606234636.2931713-1-shaoqin.huang@intel.com>
On Mon, Jun 06, 2022 at 05:46:36PM -0600, shaoqin.huang@intel.com wrote:
> From: Shaoqin Huang <shaoqin.huang@intel.com>
>
> When freeing obsolete previous roots, check prev_roots as intended, not
> the current root.
>
> Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com>
> Fixes: 527d5cd7eece ("KVM: x86/mmu: Zap only obsolete roots if a root shadow page is zapped")
> Cc: stable@vger.kernel.org
> ---
> arch/x86/kvm/mmu/mmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index f4653688fa6d..e826ee9138fa 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -5179,7 +5179,7 @@ static void __kvm_mmu_free_obsolete_roots(struct kvm *kvm, struct kvm_mmu *mmu)
> roots_to_free |= KVM_MMU_ROOT_CURRENT;
>
> for (i = 0; i < KVM_MMU_NUM_PREV_ROOTS; i++) {
> - if (is_obsolete_root(kvm, mmu->root.hpa))
> + if (is_obsolete_root(kvm, mmu->prev_roots[i].hpa))
> roots_to_free |= KVM_MMU_ROOT_PREVIOUS(i);
> }
>
> --
> 2.30.2
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2022-06-06 9:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 23:46 [PATCH] KVM: x86/mmu: Check every prev_roots in __kvm_mmu_free_obsolete_roots() shaoqin.huang
2022-06-06 9:26 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-06 23:48 shaoqin.huang
2022-06-06 9:26 ` Greg KH
2022-06-06 23:44 shaoqin.huang
[not found] <20220606234211.2931304-1-shaoqin.huang@intel.com>
2022-06-06 23:42 ` shaoqin.huang
2022-05-23 1:09 shaoqin.huang
2022-05-23 16:17 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yp3IVmtCITw6qmub@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=shaoqin.huang@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.