[tip:tools/kvm] kvm tools: use correct error value for virtio-9p RLERROR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  427dad4b0f99270b6d0ef1f3d24818cb1320a478
Gitweb:     http://git.kernel.org/tip/427dad4b0f99270b6d0ef1f3d24818cb1320a478
Author:     Sasha Levin <levinsasha928@xxxxxxxxx>
AuthorDate: Sun, 22 Jul 2012 18:29:53 +0200
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Tue, 31 Jul 2012 09:25:02 +0300

kvm tools: use correct error value for virtio-9p RLERROR

RLERROR expects positive error values, passing negative values causes guest kernel
panic.

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 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 6c115ff..99279f1 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;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux