From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH] kvm tools: use correct error value for virtio-9p RLERROR Date: Sun, 22 Jul 2012 18:29:53 +0200 Message-ID: <1342974594-31317-4-git-send-email-levinsasha928@gmail.com> References: <1342974594-31317-1-git-send-email-levinsasha928@gmail.com> Cc: kvm@vger.kernel.org, Sasha Levin To: penberg@kernel.org, mingo@elte.hu, gorcunov@gmail.com Return-path: Received: from mail-wi0-f178.google.com ([209.85.212.178]:56487 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088Ab2GVQ37 (ORCPT ); Sun, 22 Jul 2012 12:29:59 -0400 Received: by wibhr14 with SMTP id hr14so2122741wib.1 for ; Sun, 22 Jul 2012 09:29:58 -0700 (PDT) In-Reply-To: <1342974594-31317-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: RLERROR expects positive error values, passing negative values causes guest kernel panic. Signed-off-by: Sasha Levin --- tools/kvm/virtio/9p.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/virtio/9p.c b/tools/kvm/virtio/9p.c index 201ea95..c663dab 100644 --- a/tools/kvm/virtio/9p.c +++ b/tools/kvm/virtio/9p.c @@ -548,7 +548,7 @@ static void virtio_p9_readdir(struct p9_dev *p9dev, fid = get_fid(p9dev, fid_val); if (!fid->is_dir) { - errno = -EINVAL; + errno = EINVAL; goto err_out; } -- 1.7.8.6