[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALMp9eR1HYE6vWcqz3q=fAJnghdehpkaTuxhU8YjeQ8C6JofoA@mail.gmail.com>
Date: Fri, 19 Aug 2022 14:54:40 -0700
From: Jim Mattson <jmattson@...gle.com>
To: Vipin Sharma <vipinsh@...gle.com>
Cc: seanjc@...gle.com, pbonzini@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: Fix mce_banks memory leak on mci_ctl2_banks
allocation failure
On Fri, Aug 19, 2022 at 11:23 AM Vipin Sharma <vipinsh@...gle.com> 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@...gle.com>
> ---
Reviewed-by: Jim Mattson <jmattson@...gle.com>
Powered by blists - more mailing lists