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

Signed-off-by: Sasha Levin <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to