From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
kvm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: Fix sev_pin_memory() error handling
Date: Fri, 31 Jul 2020 20:18:59 +0000 [thread overview]
Message-ID: <20200731201859.GF31451@linux.intel.com> (raw)
In-Reply-To: <20200714142351.GA315374@mwanda>
On Tue, Jul 14, 2020 at 05:23:51PM +0300, Dan Carpenter wrote:
> The sev_pin_memory() function was modified to return error pointers
> instead of NULL but there are two problems. The first problem is that
> if "npages" is zero then it still returns NULL. Secondly, several of
> the callers were not updated to check for error pointers instead of
> NULL.
>
> Either one of these issues will lead to an Oops.
>
> Fixes: a8d908b5873c ("KVM: x86: report sev_pin_memory errors with PTR_ERR")
Explicit Cc: to stable needed for KVM patches.
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
WARNING: multiple messages have this Message-ID (diff)
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
kvm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: Fix sev_pin_memory() error handling
Date: Fri, 31 Jul 2020 13:18:59 -0700 [thread overview]
Message-ID: <20200731201859.GF31451@linux.intel.com> (raw)
In-Reply-To: <20200714142351.GA315374@mwanda>
On Tue, Jul 14, 2020 at 05:23:51PM +0300, Dan Carpenter wrote:
> The sev_pin_memory() function was modified to return error pointers
> instead of NULL but there are two problems. The first problem is that
> if "npages" is zero then it still returns NULL. Secondly, several of
> the callers were not updated to check for error pointers instead of
> NULL.
>
> Either one of these issues will lead to an Oops.
>
> Fixes: a8d908b5873c ("KVM: x86: report sev_pin_memory errors with PTR_ERR")
Explicit Cc: to stable needed for KVM patches.
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
next prev parent reply other threads:[~2020-07-31 20:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 14:23 [PATCH] KVM: SVM: Fix sev_pin_memory() error handling Dan Carpenter
2020-07-14 14:23 ` Dan Carpenter
2020-07-31 20:18 ` Sean Christopherson [this message]
2020-07-31 20:18 ` Sean Christopherson
2020-08-03 10:27 ` Paolo Bonzini
2020-08-03 10:27 ` Paolo Bonzini
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=20200731201859.GF31451@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=bp@alien8.de \
--cc=dan.carpenter@oracle.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@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.