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

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

 



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

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux