From: Sean Christopherson <seanjc@google.com>
To: Vipin Sharma <vipinsh@google.com>
Cc: pbonzini@redhat.com, jmattson@google.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Fix mce_banks memory leak on mci_ctl2_banks allocation failure
Date: Tue, 30 Aug 2022 21:45:51 +0000 [thread overview]
Message-ID: <Yw6FD867fK2Blf1G@google.com> (raw)
In-Reply-To: <20220819182258.588335-1-vipinsh@google.com>
On Fri, Aug 19, 2022, Vipin Sharma wrote:
> If mci_ctl2_banks allocation fails, kvm goes to fail_free_pio_data and
> forgets about freeing mce_banks memory causing memory leak.
>
> Individually check memory allocation status and free memory in the correct
> order.
>
> Fixes: 281b52780b57 ("KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs.")
> Signed-off-by: Vipin Sharma <vipinsh@google.com>
> ---
Pushed to branch `for_paolo/6.1` at:
https://github.com/sean-jc/linux.git
Unless you hear otherwise, it will make its way to kvm/queue "soon".
Note, the commit IDs are not guaranteed to be stable.
next prev parent reply other threads:[~2022-08-30 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 18:22 [PATCH] KVM: x86: Fix mce_banks memory leak on mci_ctl2_banks allocation failure Vipin Sharma
2022-08-19 21:54 ` Jim Mattson
2022-08-30 21:45 ` Sean Christopherson [this message]
2022-09-08 15:20 ` 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=Yw6FD867fK2Blf1G@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=vipinsh@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox