From patchwork Sun Jul 22 16:29:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1224711 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 01D733FC5A for ; Sun, 22 Jul 2012 16:30:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128Ab2GVQac (ORCPT ); Sun, 22 Jul 2012 12:30:32 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=nNtLmC6iWZMY5feUPLTPD5d+ikDALFY06O/2kawOyPY=; b=Ub2t74UHMH5XkAyVsVd6L5ltQaLT97Y0oiPa06lMAsg6ePffcZ2U8uF8aTJXp10xXy ME93T00i6TomLFr72+qTC9WyyZFz4Na69I3wDrl33KACcaxE2Q8fI0UvGvsFw+4xRWOW 828acn6sK/n8+RfNbuM5uW6UicgpocEwnjrJsgooR+2lI6nqn0zU+s9w/s//8a/BAacg oNjlKSSn1GCxKedSdDtOjlwAorZTrG+SBvRVWCnSzQh99RZUI3Sj0pPXnNE4Ph12Jdlp G6g0VoVI9/IJ4SDDjhQjE/Bt7Xzt+zp6ltsbbBYS4w0eke0gY1RsxZ6gcfkBhbSK3Z5c 484w== Received: by 10.180.91.1 with SMTP id ca1mr41121326wib.8.1342974598451; Sun, 22 Jul 2012 09:29:58 -0700 (PDT) Received: from localhost.localdomain ([217.203.160.170]) by mx.google.com with ESMTPS id ep14sm17495905wid.0.2012.07.22.09.29.54 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 22 Jul 2012 09:29:57 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org, mingo@elte.hu, gorcunov@gmail.com Cc: kvm@vger.kernel.org, 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> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1342974594-31317-1-git-send-email-levinsasha928@gmail.com> References: <1342974594-31317-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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; }