From: Sasha Levin <levinsasha928@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: mingo@elte.hu, gorcunov@gmail.com, asias.hejun@gmail.com,
kvm@vger.kernel.org
Subject: Re: [PATCH] kvm tools: Fix segfault when failing to initialize KVM
Date: Wed, 01 Feb 2012 07:48:14 -0500 [thread overview]
Message-ID: <1328100494.6697.25.camel@lappy> (raw)
In-Reply-To: <alpine.LFD.2.02.1202010904270.2450@tux.localdomain>
On Wed, 2012-02-01 at 09:05 +0200, Pekka Enberg wrote:
> On Tue, 31 Jan 2012, Sasha Levin wrote:
> > Might happen when hardware virtualization is not supported.
> >
> > Reported-by: Ingo Molnar <mingo@elte.hu>
> > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> > ---
> > tools/kvm/builtin-run.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
> > index 6ded1d2..a67faf8 100644
> > --- a/tools/kvm/builtin-run.c
> > +++ b/tools/kvm/builtin-run.c
> > @@ -997,6 +997,10 @@ static int kvm_cmd_run_init(int argc, const char **argv)
> > }
> >
> > kvm = kvm__init(dev, hugetlbfs_path, ram_size, guest_name);
> > + if (IS_ERR_OR_NULL(kvm)) {
> > + r = PTR_ERR(kvm);
>
> How is this going to work when 'kvm' is NULL? It'd be best if kvm_init()
> never returned NULL on error.
Actually, it never does, I'm not sure why I put IS_ERR_OR_NULL there.
I'll resend that one.
--
Sasha.
prev parent reply other threads:[~2012-02-01 12:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 2:07 [PATCH] kvm tools: Fix segfault when failing to initialize KVM Sasha Levin
2012-02-01 7:05 ` Pekka Enberg
2012-02-01 7:19 ` Cyrill Gorcunov
2012-02-01 7:26 ` Pekka Enberg
2012-02-01 7:28 ` Cyrill Gorcunov
2012-02-01 12:48 ` Sasha Levin [this message]
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=1328100494.6697.25.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).