From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH 1/2] kvm tool: Report error and don't segfault if kvm__init() fails Date: Mon, 6 Feb 2012 14:27:24 +0400 Message-ID: <20120206102724.GA17860@moon> References: <1328497743-19348-1-git-send-email-michael@ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Michael Ellerman , kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:60056 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab2BFK13 (ORCPT ); Mon, 6 Feb 2012 05:27:29 -0500 Received: by bkcjm19 with SMTP id jm19so4533902bkc.19 for ; Mon, 06 Feb 2012 02:27:27 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Feb 06, 2012 at 12:22:04PM +0200, Pekka Enberg wrote: > Hi Michael, > > On Mon, 6 Feb 2012, Michael Ellerman wrote: > >Signed-off-by: Michael Ellerman > >--- > >tools/kvm/builtin-run.c | 5 +++++ > >1 files changed, 5 insertions(+), 0 deletions(-) > > > >diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c > >index 95d35a5..569246e 100644 > >--- a/tools/kvm/builtin-run.c > >+++ b/tools/kvm/builtin-run.c > >@@ -997,6 +997,11 @@ static int kvm_cmd_run_init(int argc, const char **argv) > > } > > > > kvm = kvm__init(dev, hugetlbfs_path, ram_size, guest_name); > >+ if (IS_ERR(kvm)) { > >+ r = PTR_ERR(kvm); > >+ pr_err("kvm__init() failed with error %d\n", r); > >+ goto fail; > >+ } > > > > I just pushed commit 3dfcb6ec85d5430622c8b99ca05451c1afd08bf5 ("kvm > tool: Don't close not yet opened files and SIGSEV fix") from > Cyrillos which was which seems to fix both issues. I was flying back > from FOSDEM so I couldn't merge it earlier, sorry. > Ouch, I somehow missed these patches from Michael. If I saw them earlier I would not provide my patch (since Michael's changelog is a way more descriptive and better than mine). Anyway, thanks! Cyrill